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:
Markus Elfring 2014-11-24 22:58:48 +01:00 коммит произвёл Greg Kroah-Hartman
Родитель 968bf0cf0c
Коммит 16ceb72839
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

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