diff options
Diffstat (limited to 'drivers/platform/x86/asus-laptop.c')
-rw-r--r-- | drivers/platform/x86/asus-laptop.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index efe8f6388906..4af5709f8317 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c | |||
@@ -1397,8 +1397,10 @@ static int asus_laptop_get_info(struct asus_laptop *asus) | |||
1397 | } | 1397 | } |
1398 | } | 1398 | } |
1399 | asus->name = kstrdup(string, GFP_KERNEL); | 1399 | asus->name = kstrdup(string, GFP_KERNEL); |
1400 | if (!asus->name) | 1400 | if (!asus->name) { |
1401 | kfree(buffer.pointer); | ||
1401 | return -ENOMEM; | 1402 | return -ENOMEM; |
1403 | } | ||
1402 | 1404 | ||
1403 | if (*string) | 1405 | if (*string) |
1404 | pr_notice(" %s model detected\n", string); | 1406 | pr_notice(" %s model detected\n", string); |