platform: x86: Deletion of checks before backlight_device_unregister()
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. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> For msi-wmi.c: Acked-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
This commit is contained in:

committed by
Darren Hart

parent
a39f46df33
commit
0098181016
@@ -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);
|
||||
|
Reference in New Issue
Block a user