[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1c53beae-e516-f208-935e-2a49416ce075@users.sourceforge.net>
Date: Sat, 23 Jul 2016 19:37:14 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: linux-fbdev@...r.kernel.org, linux-omap@...r.kernel.org,
Dave Airlie <airlied@...il.com>,
Jean-Christophe Plagniol-Villard <plagnioj@...osoft.com>,
Peter Ujfalusi <peter.ujfalusi@...com>,
Rob Clark <robdclark@...il.com>,
Tomi Valkeinen <tomi.valkeinen@...com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Julia Lawall <julia.lawall@...6.fr>
Subject: [PATCH] omapfb: panel-dsi-cm: Delete an unnecessary check before
backlight_device_unregister()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 23 Jul 2016 19:29:28 +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@...rs.sourceforge.net>
---
drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c
index b58012b..9d308db 100644
--- a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c
+++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c
@@ -1283,8 +1283,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.9.2
Powered by blists - more mailing lists