2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00

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>
This commit is contained in:
Matthew Garrett 2012-12-28 10:54:42 -05:00
parent f7cb13b3f2
commit 9f89748463

View File

@ -1743,7 +1743,7 @@ static int asus_laptop_get_info(struct asus_laptop *asus)
return -ENOMEM; return -ENOMEM;
} }
if (*string) if (string)
pr_notice(" %s model detected\n", string); pr_notice(" %s model detected\n", string);
if (!acpi_check_handle(asus->handle, METHOD_WL_STATUS, NULL)) if (!acpi_check_handle(asus->handle, METHOD_WL_STATUS, NULL))