platform/x86: dell-laptop: fix error return code in dell_init()
PATCH 1/1 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.
--- drivers/platform/x86/dell-laptop.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/platform/x86/dell-laptop.c +3 -1
@@ -2081,8 +2081,10 @@ static int __init dell_init(void) } buffer =kzalloc (sizeof (struct calling_interface_buffer ),GFP_KERNEL ); -if (!buffer) +if (!buffer) { + ret = -ENOMEM ; goto fail_buffer; + }if (quirks && quirks->touchpad_led)touchpad_led_init (&platform_device->dev);
Quoted 26 lines
-----Original Message-----
From: [email protected] [mailto:platform-driver-x86- [email protected]] On Behalf Of Wei Yongjun
Sent: Tuesday, November 14, 2017 7:40 AM
To: [email protected]; [email protected]; [email protected]; [email protected]; Limonciello, Mario <[email protected]>
Cc: Wei Yongjun <[email protected]>; platform-driver- [email protected]
Subject: [PATCH -next] platform/x86: dell-laptop: fix error return code indell_init()Fix to return error code
-ENOMEMfrom thekzalloc()error handling case instead of 0, as done elsewhere in this function.Fixes 549b4930f057 ("platform/x86: dell-smbios: Introduce dispatcher for SMMcalls")
Signed-off-by Wei Yongjun <[email protected]>--- drivers/platform/x86/dell-laptop.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/platform/x86/dell-laptop.c +0
-0@@ -2081,8 +2081,10 @@ static int __init dell_init(void) }
drivers/platform/x86/dell-laptop.c static int __init dell_init(void) · line 2090
Quoted 10 lines
drivers/platform/x86/dell-laptop.c +3
-1buffer =kzalloc (sizeof (struct calling_interface_buffer ),GFP_KERNEL ); -if (!buffer) +if (!buffer) { + ret = -ENOMEM ; goto fail_buffer; + }if (quirks && quirks->touchpad_led)touchpad_led_init (&platform_device->dev);
Thanks.
Quoted 10 lines · On Tue, Nov 14, 2017 at 4:38 PM, <[email protected]> wrote:
Quoted 10 lines
-----Original Message-----
From: [email protected] [mailto:platform-driver-x86- [email protected]] On Behalf Of Wei Yongjun
Sent: Tuesday, November 14, 2017 7:40 AM
To: [email protected]; [email protected]; [email protected]; [email protected]; Limonciello, Mario <[email protected]>
Cc: Wei Yongjun <[email protected]>; platform-driver- [email protected]
Subject: [PATCH -next] platform/x86: dell-laptop: fix error return code indell_init()
Quoted 6 lines
Quoted 6 lines
Fix to return error code
-ENOMEMfrom thekzalloc()error handling case instead of 0, as done elsewhere in this function.Fixes 549b4930f057 ("platform/x86: dell-smbios: Introduce dispatcher for SMMcalls")
Signed-off-by Wei Yongjun <[email protected]>
Pushed to my review and testing queue, thanks.
Shall we send this as material for -rc2 ?
Quoted 24 lines
Quoted 10 lines
--- drivers/platform/x86/dell-laptop.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/platform/x86/dell-laptop.c +0
-0@@ -2081,8 +2081,10 @@ static int __init dell_init(void) }drivers/platform/x86/dell-laptop.c static int __init dell_init(void) · line 2090
Quoted 10 lines
drivers/platform/x86/dell-laptop.c +3
-1buffer =kzalloc (sizeof (struct calling_interface_buffer ),GFP_KERNEL ); -if (!buffer) +if (!buffer) { + ret = -ENOMEM ; goto fail_buffer; + }if (quirks && quirks->touchpad_led)touchpad_led_init (&platform_device->dev);Thanks.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 14 lines · Andy Shevchenko
Quoted 13 lines · On Tue, Nov 14, 2017 at 4:38 PM, <[email protected]> wrote:
Quoted 13 lines
-----Original Message-----
From: [email protected] [mailto:platform-driver-x86- [email protected]] On Behalf Of Wei Yongjun
Sent: Tuesday, November 14, 2017 7:40 AM
To: [email protected]; [email protected]; [email protected]; [email protected]; Limonciello, Mario <[email protected]>
Cc: Wei Yongjun <[email protected]>; platform-driver- [email protected]
Subject: [PATCH -next] platform/x86: dell-laptop: fix error return code indell_init()Fix to return error code
-ENOMEMfrom thekzalloc()error handling case instead of 0, as done elsewhere in this function.
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
Fixes 549b4930f057 ("platform/x86: dell-smbios: Introduce dispatcher for SMMcalls")
Signed-off-by Wei Yongjun <[email protected]>Pushed to my review and testing queue, thanks.
Shall we send this as material for -rc2 ?
I have one more queued in for-next already. So pleasae propogate this to for-next along with anything else you want to go out and I'll send the pull request tomorrow (Wed) to Linus. Then we'll do our transition to "Fixes" for the RC cycle (a bit later than usual).
Signature · 2 lines
Darren Hart VMware Open Source Technology Center
Quoted 5 lines · On Tuesday 14 November 2017 13:40:13 Wei Yongjun wrote:
Fix to return error code
-ENOMEMfrom thekzalloc()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 <[email protected]>
Looks good,
Quoted 21 lines
--- drivers/platform/x86/dell-laptop.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/platform/x86/dell-laptop.c +3
-1@@ -2081,8 +2081,10 @@ static int __init dell_init(void) } buffer =kzalloc (sizeof (struct calling_interface_buffer ),GFP_KERNEL ); -if (!buffer) +if (!buffer) { + ret = -ENOMEM ; goto fail_buffer; + }if (quirks && quirks->touchpad_led)touchpad_led_init (&platform_device->dev);
Signature · 2 lines
Pali Rohár [email protected]