From 6710c61d03d5bab8321208156113a31676967407 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Fri, 28 Dec 2012 10:54:42 -0500 Subject: [PATCH] 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 --- drivers/platform/x86/asus-laptop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index 61a9150e56e4..12ae67592d60 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c @@ -1774,7 +1774,7 @@ static int asus_laptop_get_info(struct asus_laptop *asus) return -ENOMEM; } - if (*string) + if (string) pr_notice(" %s model detected\n", string); if (!acpi_check_handle(asus->handle, METHOD_WL_STATUS, NULL)) -- 2.39.5