aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorweiyongjun (A) <weiyongjun1@huawei.com>2017-11-14 08:40:13 -0500
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2017-11-21 13:11:44 -0500
commitc6f9288ee460565b94994aaf3261318199c2a674 (patch)
tree54b462c08c87929bddfc9635d02935ffa134707c
parent4255c30fe88ee3cc99bbeac7974db27e4217a497 (diff)
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: 549b4930f057 ("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>
-rw-r--r--drivers/platform/x86/dell-laptop.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index 2d704361f672..bf897b1832b1 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -2074,8 +2074,10 @@ static int __init dell_init(void)
2074 goto fail_platform_device2; 2074 goto fail_platform_device2;
2075 2075
2076 buffer = kzalloc(sizeof(struct calling_interface_buffer), GFP_KERNEL); 2076 buffer = kzalloc(sizeof(struct calling_interface_buffer), GFP_KERNEL);
2077 if (!buffer) 2077 if (!buffer) {
2078 ret = -ENOMEM;
2078 goto fail_buffer; 2079 goto fail_buffer;
2080 }
2079 2081
2080 2082
2081 ret = dell_setup_rfkill(); 2083 ret = dell_setup_rfkill();