提交 c6f9288e 编写于 作者: W weiyongjun (A) 提交者: Andy Shevchenko

platform/x86: dell-laptop: fix error return code in dell_init()

Fix to return error code -ENOMEM from the kzalloc() error handling
case instead of 0, as done elsewhere in this function.

Fixes: 549b4930 ("platform/x86: dell-smbios: Introduce dispatcher for SMM calls")
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Acked-by: NMario Limonciello <mario.limonciello@dell.com>
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
上级 4255c30f
...@@ -2074,8 +2074,10 @@ static int __init dell_init(void) ...@@ -2074,8 +2074,10 @@ static int __init dell_init(void)
goto fail_platform_device2; goto fail_platform_device2;
buffer = kzalloc(sizeof(struct calling_interface_buffer), GFP_KERNEL); buffer = kzalloc(sizeof(struct calling_interface_buffer), GFP_KERNEL);
if (!buffer) if (!buffer) {
ret = -ENOMEM;
goto fail_buffer; goto fail_buffer;
}
ret = dell_setup_rfkill(); ret = dell_setup_rfkill();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册