lkml.org 
[lkml]   [2014]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH 1/1] platform: x86: Deletion of checks before backlight_device_unregister()
    Date
    Hi Markus,

    Le lundi 24 novembre 2014, 20:40:22 SF Markus Elfring a écrit :
    > From: Markus Elfring <elfring@users.sourceforge.net>
    > Date: Mon, 24 Nov 2014 20:30:29 +0100
    >
    > The backlight_device_unregister() function tests whether its argument is
    > NULL and then returns immediately. Thus the test around the call is not
    > needed.
    >
    > This issue was detected by using the Coccinelle software.

    What script was used ? Is it in scripts/coccinelle ?


    > diff --git a/drivers/platform/x86/msi-wmi.c b/drivers/platform/x86/msi-wmi.c
    > index 70222f2..6d2bac0 100644
    > --- a/drivers/platform/x86/msi-wmi.c
    > +++ b/drivers/platform/x86/msi-wmi.c
    > @@ -354,8 +354,7 @@ static void __exit msi_wmi_exit(void)
    > sparse_keymap_free(msi_wmi_input_dev);
    > input_unregister_device(msi_wmi_input_dev);
    > }
    > - if (backlight)
    > - backlight_device_unregister(backlight);
    > + backlight_device_unregister(backlight);
    > }
    >
    > module_init(msi_wmi_init);

    For this part:
    Acked-by: Anisse Astier <anisse@astier.eu>

    Regards,

    Anisse


    \
     
     \ /
      Last update: 2014-11-24 23:01    [W:4.027 / U:0.920 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site