video: mx3fb: Deletion of an unnecessary check before the function call "backlight_de...
authorMarkus Elfring <elfring@users.sourceforge.net>
Sun, 23 Nov 2014 14:15:29 +0000 (15:15 +0100)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 4 Dec 2014 14:16:01 +0000 (16:16 +0200)
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: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/fbdev/mx3fb.c

index 23ec781..f23fca0 100644 (file)
@@ -334,8 +334,7 @@ static void mx3fb_init_backlight(struct mx3fb_data *fbd)
 
 static void mx3fb_exit_backlight(struct mx3fb_data *fbd)
 {
-       if (fbd->bl)
-               backlight_device_unregister(fbd->bl);
+       backlight_device_unregister(fbd->bl);
 }
 
 static void mx3fb_dma_done(void *);