From: Markus Elfring <elfr...@users.sourceforge.net>
Date: Sun, 28 Jun 2015 14:30:17 +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 <elfr...@users.sourceforge.net>
---
 drivers/video/fbdev/omap2/displays-new/panel-dsi-cm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/omap2/displays-new/panel-dsi-cm.c 
b/drivers/video/fbdev/omap2/displays-new/panel-dsi-cm.c
index 3414c26..d2caa41 100644
--- a/drivers/video/fbdev/omap2/displays-new/panel-dsi-cm.c
+++ b/drivers/video/fbdev/omap2/displays-new/panel-dsi-cm.c
@@ -1323,8 +1323,7 @@ static int dsicm_probe(struct platform_device *pdev)
        return 0;
 
 err_sysfs_create:
-       if (bldev != NULL)
-               backlight_device_unregister(bldev);
+       backlight_device_unregister(bldev);
 err_bl:
        destroy_workqueue(ddata->workqueue);
 err_reg:
-- 
2.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to