Re: [PATCH -next] platform/x86: dell-laptop: fix error return code in dell_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 14, 2017 at 4:38 PM,  <Mario.Limonciello@xxxxxxxx> wrote:
>> -----Original Message-----
>> From: platform-driver-x86-owner@xxxxxxxxxxxxxxx [mailto:platform-driver-x86-
>> owner@xxxxxxxxxxxxxxx] On Behalf Of Wei Yongjun
>> Sent: Tuesday, November 14, 2017 7:40 AM
>> To: mjg59@xxxxxxxxxxxxx; pali.rohar@xxxxxxxxx; dvhart@xxxxxxxxxxxxx;
>> andy@xxxxxxxxxxxxx; Limonciello, Mario <Mario_Limonciello@xxxxxxxx>
>> Cc: Wei Yongjun <weiyongjun1@xxxxxxxxxx>; platform-driver-
>> x86@xxxxxxxxxxxxxxx
>> Subject: [PATCH -next] 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@xxxxxxxxxx>

Pushed to my review and testing queue, thanks.

Shall we send this as material for -rc2 ?

>> ---
>>  drivers/platform/x86/dell-laptop.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
>> index c4903c5..0a8f359 100644
>> --- a/drivers/platform/x86/dell-laptop.c
>> +++ b/drivers/platform/x86/dell-laptop.c
>> @@ -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);
>
> Thanks.
>
> Acked-by: Mario Limonciello <mario.limonciello@xxxxxxxx>



-- 
With Best Regards,
Andy Shevchenko




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux