]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
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>
Fri, 28 Dec 2012 15:54:42 +0000 (10:54 -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 61a9150e56e42e8a5cd2de0dde3506e9475cd26d..12ae67592d60d3be79f5a3406eb26bd47c427e74 100644 (file)
@@ -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))