Skip to content

Commit

Permalink
platform/x86: dell-laptop: fix error return code in dell_init()
Browse files Browse the repository at this point in the history
Fix to return error code -ENOMEM from the kzalloc() error handling
case instead of 0, as done elsewhere in this function.

Fixes: 549b493 ("platform/x86: dell-smbios: Introduce dispatcher for SMM calls")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Mario Limonciello <mario.limonciello@dell.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
  • Loading branch information
weiyongjun (A) authored and Andy Shevchenko committed Nov 21, 2017
1 parent 4255c30 commit c6f9288
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/platform/x86/dell-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -2074,8 +2074,10 @@ static int __init dell_init(void)
goto fail_platform_device2;

buffer = kzalloc(sizeof(struct calling_interface_buffer), GFP_KERNEL);
if (!buffer)
if (!buffer) {
ret = -ENOMEM;
goto fail_buffer;
}


ret = dell_setup_rfkill();
Expand Down

0 comments on commit c6f9288

Please sign in to comment.