The 'id' pointer is never NULL since it has the same address as 'symval'. Also, checking (*id)[0] is simpler than calling strlen().
Unified · Split
| @@ -570,7 +570,7 @@ static int do_acpi_entry(const char *filename, · 569 unmodified lines | ||
| 570 | 570 | DEF_FIELD(symval, acpi_device_id, cls); |
| 571 | 571 | DEF_FIELD(symval, acpi_device_id, cls_msk); |
| 572 | 572 | |
| 573 | − if (id && strlen((const char *)*id)) | |
| 573 | + if ((*id)[0]) | |
| 574 | 574 | sprintf(alias, "acpi*:%s:*", *id); |
| 575 | 575 | else { |
| 576 | 576 | int i, byte_shift, cnt = 0; |