1
0
Fork 0

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>
hifive-unleashed-5.1
Markus Elfring 2014-11-24 22:58:48 +01:00 committed by Greg Kroah-Hartman
parent 968bf0cf0c
commit 16ceb72839
1 changed files with 1 additions and 2 deletions

View File

@ -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);