Skip to content

Commit b7bca42

Browse files
committed
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 <[email protected]>
1 parent 0c3e091 commit b7bca42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/mod/file2alias.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ static int do_acpi_entry(const char *filename,
570570
DEF_FIELD(symval, acpi_device_id, cls);
571571
DEF_FIELD(symval, acpi_device_id, cls_msk);
572572

573-
if (id && strlen((const char *)*id))
573+
if ((*id)[0])
574574
sprintf(alias, "acpi*:%s:*", *id);
575575
else {
576576
int i, byte_shift, cnt = 0;

0 commit comments

Comments
 (0)