From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anisse Astier Date: Mon, 24 Nov 2014 21:28:32 +0000 Subject: Re: [PATCH 1/1] platform: x86: Deletion of checks before backlight_device_unregister() Message-Id: <3842367.ojrMxTW2rH@path> List-Id: References: <5307CAA2.8060406@users.sourceforge.net> <5317A59D.4@users.sourceforge.net> <547389A6.9090106@users.sourceforge.net> In-Reply-To: <547389A6.9090106@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: SF Markus Elfring Cc: Corentin Chary , Darren Hart , Ike Panhc , Jonathan Woithe , Mattia Dongili , platform-driver-x86@vger.kernel.org, acpi4asus-user@lists.sourceforge.net, LKML , kernel-janitors@vger.kernel.org, Julia Lawall Hi Markus, Le lundi 24 novembre 2014, 20:40:22 SF Markus Elfring a =E9crit : > From: Markus Elfring > Date: Mon, 24 Nov 2014 20:30:29 +0100 >=20 > The backlight_device_unregister() function tests whether its argument is > NULL and then returns immediately. Thus the test around the call is not > needed. >=20 > 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-wm= i.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); > } >=20 > module_init(msi_wmi_init); For this part: Acked-by: Anisse Astier Regards, Anisse -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html