diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2024-11-20 08:56:40 +0900 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2024-11-28 08:11:56 +0900 |
commit | b7bca42d101d8d9678068cde645bd6d0afa8a20f (patch) | |
tree | e21b892ea815b6a3f930f295edcbddcac58ec601 /scripts | |
parent | 0c3e091319e4748cb36ac9a50848903dc6f54054 (diff) |
modpost: remove unnecessary check in do_acpi_entry()
The 'id' pointer is never NULL since it has the same address as
'symval'.
Also, checking (*id)[0] is simpler than calling strlen().
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mod/file2alias.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 634e40748287..34678ed40fdb 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -570,7 +570,7 @@ static int do_acpi_entry(const char *filename, DEF_FIELD(symval, acpi_device_id, cls); DEF_FIELD(symval, acpi_device_id, cls_msk); - if (id && strlen((const char *)*id)) + if ((*id)[0]) sprintf(alias, "acpi*:%s:*", *id); else { int i, byte_shift, cnt = 0; |