asus-laptop: Fix potential invalid pointer dereference
The 0-day build testing backend noticed that a string could be dereferenced
without validation. Fix that.
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index d0c5197..fcde4e5 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -1743,7 +1743,7 @@
return -ENOMEM;
}
- if (*string)
+ if (string)
pr_notice(" %s model detected\n", string);
if (!acpi_check_handle(asus->handle, METHOD_WL_STATUS, NULL))