Skip to content

Commit

Permalink
fbdev: sh_mobile_lcdc: Destroy mutex at remove time
Browse files Browse the repository at this point in the history
Add a missing mutex_destroy() call when the driver is unbound from the
device.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
  • Loading branch information
Laurent Pinchart committed Jul 19, 2012
1 parent 239921e commit 0c75c4e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/video/sh_mobile_lcdcfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2444,8 +2444,11 @@ static int sh_mobile_lcdc_remove(struct platform_device *pdev)
}

for (i = 0; i < ARRAY_SIZE(priv->ch); i++) {
if (priv->ch[i].bl)
sh_mobile_lcdc_bl_remove(priv->ch[i].bl);
struct sh_mobile_lcdc_chan *ch = &priv->ch[i];

if (ch->bl)
sh_mobile_lcdc_bl_remove(ch->bl);
mutex_destroy(&ch->open_lock);
}

if (priv->dot_clk) {
Expand Down

0 comments on commit 0c75c4e

Please sign in to comment.