linux-stable/scripts/mod
Mauricio Faria de Oliveira 272ba9ebfb modpost: add missing else to the "of" check
[ Upstream commit cbc3d00cf8 ]

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>
2023-10-10 21:45:01 +02:00
..
.gitignore
Makefile
devicetable-offsets.c usb: typec: Bus type for alternate modes 2018-07-02 17:42:36 +02:00
empty.c
file2alias.c modpost: add missing else to the "of" check 2023-10-10 21:45:01 +02:00
mk_elfconfig.c
modpost.c modpost: fix section mismatch message for R_ARM_{PC24,CALL,JUMP24} 2023-08-11 11:45:10 +02:00
modpost.h
sumversion.c modpost: delete stale comment 2018-05-03 01:17:44 +09:00