aboutsummaryrefslogtreecommitdiff
path: root/scripts/mod
diff options
context:
space:
mode:
authorGravatar Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2020-07-27 11:49:37 +0200
committerGravatar Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2020-07-27 11:49:37 +0200
commit65a9bde6ed484880987a6d88de6e372eca52059f (patch)
treea192e1a8a54d334f457413f9c16041ffdf11533d /scripts/mod
parentMerge tag 'misc-habanalabs-next-2020-07-24' of git://people.freedesktop.org/~... (diff)
parentLinux 5.8-rc7 (diff)
downloadlinux-65a9bde6ed484880987a6d88de6e372eca52059f.tar.gz
linux-65a9bde6ed484880987a6d88de6e372eca52059f.tar.bz2
linux-65a9bde6ed484880987a6d88de6e372eca52059f.zip
Merge 5.8-rc7 into char-misc-next
This should resolve the merge/build issues reported when trying to create linux-next. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/mod')
-rw-r--r--scripts/mod/modpost.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 6aea65c65745..45f2ab2ec2d4 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -138,11 +138,19 @@ char *read_text_file(const char *filename)
char *get_line(char **stringp)
{
+ char *orig = *stringp, *next;
+
/* do not return the unwanted extra line at EOF */
- if (*stringp && **stringp == '\0')
+ if (!orig || *orig == '\0')
return NULL;
- return strsep(stringp, "\n");
+ next = strchr(orig, '\n');
+ if (next)
+ *next++ = '\0';
+
+ *stringp = next;
+
+ return orig;
}
/* A list of all modules we processed */