mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 14:19:16 +00:00
modpost: add missing else to the "of" check
[ Upstream commitcbc3d00cf8
] Without this 'else' statement, an "usb" name goes into two handlers: the first/previous 'if' statement _AND_ the for-loop over 'devtable', but the latter is useless as it has no 'usb' device_id entry anyway. Tested with allmodconfig before/after patch; no changes to *.mod.c: git checkout v6.6-rc3 make -j$(nproc) allmodconfig make -j$(nproc) olddefconfig make -j$(nproc) find . -name '*.mod.c' | cpio -pd /tmp/before # apply patch make -j$(nproc) find . -name '*.mod.c' | cpio -pd /tmp/after diff -r /tmp/before/ /tmp/after/ # no difference Fixes:acbef7b766
("modpost: fix module autoloading for OF devices with generic compatible property") Signed-off-by: Mauricio Faria de Oliveira <mfo@canonical.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
e5ccce2c1d
commit
272ba9ebfb
1 changed files with 1 additions and 1 deletions
|
@ -1395,7 +1395,7 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
|
||||||
/* First handle the "special" cases */
|
/* First handle the "special" cases */
|
||||||
if (sym_is(name, namelen, "usb"))
|
if (sym_is(name, namelen, "usb"))
|
||||||
do_usb_table(symval, sym->st_size, mod);
|
do_usb_table(symval, sym->st_size, mod);
|
||||||
if (sym_is(name, namelen, "of"))
|
else if (sym_is(name, namelen, "of"))
|
||||||
do_of_table(symval, sym->st_size, mod);
|
do_of_table(symval, sym->st_size, mod);
|
||||||
else if (sym_is(name, namelen, "pnp"))
|
else if (sym_is(name, namelen, "pnp"))
|
||||||
do_pnp_device_entry(symval, sym->st_size, mod);
|
do_pnp_device_entry(symval, sym->st_size, mod);
|
||||||
|
|
Loading…
Reference in a new issue