From: Matthew Garrett Date: Fri, 28 Dec 2012 15:54:42 +0000 (-0500) Subject: asus-laptop: Fix potential invalid pointer dereference X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=9f89748463f13c9657496b12820f09a988ce77ff;p=deliverable%2Flinux.git 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 --- diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index d0c519762dcf..fcde4e528819 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c @@ -1743,7 +1743,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))