Skip to content

Commit

Permalink
asus-laptop: Fix potential invalid pointer dereference
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matthew Garrett committed Jan 7, 2013
1 parent f7cb13b commit 9f89748
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/platform/x86/asus-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 9f89748

Please sign in to comment.