modpost: trim leading spaces when processing source files list

get_line() does not trim the leading spaces, but the
parse_source_files() expects to get lines with source files paths where
the first space occurs after the file path.

Fixes: 70f30cfe5b89 ("modpost: use read_text_file() and get_line() for reading text files")
Signed-off-by: Radek Krejci <radek.krejci@oracle.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

authored by Radek Krejci and committed by Masahiro Yamada 5d9a16b2 dae4a017

Changed files
+6 -1
scripts
+6 -1
scripts/mod/sumversion.c
··· 326 326 327 327 /* Sum all files in the same dir or subdirs. */ 328 328 while ((line = get_line(&pos))) { 329 - char* p = line; 329 + char* p; 330 + 331 + /* trim the leading spaces away */ 332 + while (isspace(*line)) 333 + line++; 334 + p = line; 330 335 331 336 if (strncmp(line, "source_", sizeof("source_")-1) == 0) { 332 337 p = strrchr(line, ' ');