Skip to content

Commit

Permalink
V4L/DVB: drivers/video/omap2/displays: add missing mutex_unlock
Browse files Browse the repository at this point in the history
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 <julia@diku.dk>
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Julia Lawall authored and Mauro Carvalho Chehab committed Aug 2, 2010
1 parent febe2ea commit 5c79b49
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/video/omap2/displays/panel-acx565akm.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ static int acx_panel_power_on(struct omap_dss_device *dssdev)
r = omapdss_sdi_display_enable(dssdev);
if (r) {
pr_err("%s sdi enable failed\n", __func__);
return r;
goto fail_unlock;
}

/*FIXME tweak me */
Expand Down Expand Up @@ -633,6 +633,8 @@ static int acx_panel_power_on(struct omap_dss_device *dssdev)
return acx565akm_bl_update_status(md->bl_dev);
fail:
omapdss_sdi_display_disable(dssdev);
fail_unlock:
mutex_unlock(&md->mutex);
return r;
}

Expand Down

0 comments on commit 5c79b49

Please sign in to comment.