drivers/video/omap2/displays: add missing mutex_unlock
Subsystems (2)
PATCH 2/2 drivers/video/omap2/displays: add missing mutex_unlock
From: Julia Lawall <[email protected]>
Add a mutex_unlock missing on the error paths. The use of the mutex is balanced elsewhere in the file.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression E1;
@@
* mutex_lock(E1,...);
<+... when != E1
if (...) {
... when != E1* return ...;
}
...+>
* mutex_unlock(E1,...);
// </smpl>
Signed-off-by Julia Lawall <[email protected]>
Acked-by Mike Isely <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/video/omap2/displays/panel-acx565akm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/video/omap2/displays/panel-acx565akm.c renamed from drivers/video/omap2/displays/panel-acx565akm.c~drivers-video-omap2-displays-add-missing-mutex_unlock +3 -1
@@ -592,7 +592,7 @@ static int acx_panel_power_on(struct oma r =omapdss_sdi_display_enable (dssdev);if (r) {pr_err ("%s sdi enable failed\n" , __func__); -return r; + goto fail_unlock; }/*FIXME tweak me */
@@ -633,6 +633,8 @@ static int acx_panel_power_on(struct omareturn acx565akm_bl_update_status (md->bl_dev); fail:omapdss_sdi_display_disable (dssdev); +fail_unlock: +mutex_unlock (&md->mutex);return r; }
_