summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2016-06-06 18:48:38 +0200
committerBen Hutchings <ben@decadent.org.uk>2016-08-22 22:38:10 +0100
commit45d20e9f61cefb6389be8d16547ddd55b63fb55b (patch)
tree5919b4985940b217a00d13755871e50d971071c5 /scripts
parent08a1ae3896142e4caf87b2a33faf1f84690e2807 (diff)
downloadlinux-stable-45d20e9f61cefb6389be8d16547ddd55b63fb55b.tar.gz
linux-stable-45d20e9f61cefb6389be8d16547ddd55b63fb55b.tar.bz2
linux-stable-45d20e9f61cefb6389be8d16547ddd55b63fb55b.zip
of: fix autoloading due to broken modalias with no 'compatible'
commit b3c0a4dab7e35a9b6d69c0415641d2280fdefb2b upstream. Because of an improper dereference, a stray 'C' character was output to the modalias when no 'compatible' was specified. This is the case for some old PowerMac drivers which only set the 'name' property. Fix it to let them match again. Reported-by: Mathieu Malaterre <malat@debian.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Tested-by: Mathieu Malaterre <malat@debian.org> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: Andreas Schwab <schwab@linux-m68k.org> Fixes: 6543becf26fff6 ("mod/file2alias: make modalias generation safe for cross compiling") Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mod/file2alias.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index e614ef689eee..268acec72c4f 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -653,7 +653,7 @@ static int do_of_entry (const char *filename, void *symval, char *alias)
len = sprintf(alias, "of:N%sT%s", (*name)[0] ? *name : "*",
(*type)[0] ? *type : "*");
- if (compatible[0])
+ if ((*compatible)[0])
sprintf(&alias[len], "%sC%s", (*type)[0] ? "*" : "",
*compatible);