asus-laptop: Fix potential invalid pointer dereference
authorMatthew Garrett <matthew.garrett@nebula.com>
Fri, 28 Dec 2012 15:54:42 +0000 (10:54 -0500)
committerMatthew Garrett <matthew.garrett@nebula.com>
Mon, 7 Jan 2013 17:33:48 +0000 (12:33 -0500)
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>
drivers/platform/x86/asus-laptop.c

index d0c519762dcf3ddf753e1ade79495c47a8a3a8c6..fcde4e528819c04daf4b919ba00d70a20f7456c3 100644 (file)
@@ -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))