staging: olpc_dcon: Deletion of a check 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
968bf0cf0c
Коммит
16ceb72839
|
@ -682,8 +682,7 @@ static int dcon_remove(struct i2c_client *client)
|
|||
|
||||
free_irq(DCON_IRQ, dcon);
|
||||
|
||||
if (dcon->bl_dev)
|
||||
backlight_device_unregister(dcon->bl_dev);
|
||||
backlight_device_unregister(dcon->bl_dev);
|
||||
|
||||
if (dcon_device != NULL)
|
||||
platform_device_unregister(dcon_device);
|
||||
|
|
Загрузка…
Ссылка в новой задаче