Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

video: mx3fb: Deletion of an unnecessary check before the function call "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: Tomi Valkeinen <tomi.valkeinen@ti.com>

authored by

Markus Elfring and committed by
Tomi Valkeinen
8a8e411d bc500d6e

+1 -2
+1 -2
drivers/video/fbdev/mx3fb.c
··· 334 334 335 335 static void mx3fb_exit_backlight(struct mx3fb_data *fbd) 336 336 { 337 - if (fbd->bl) 338 - backlight_device_unregister(fbd->bl); 337 + backlight_device_unregister(fbd->bl); 339 338 } 340 339 341 340 static void mx3fb_dma_done(void *);