From: Laurent Pinchart Date: Thu, 15 Mar 2012 17:34:05 +0000 (+0100) Subject: fbdev: sh_mobile_lcdc: Destroy mutex at remove time X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0c75c4e073a8ec35bfd6c8adcceb2b896f2063e2;p=linux-beck.git fbdev: sh_mobile_lcdc: Destroy mutex at remove time Add a missing mutex_destroy() call when the driver is unbound from the device. Signed-off-by: Laurent Pinchart --- diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c index 9da4b1b619e6..644c2309a49a 100644 --- a/drivers/video/sh_mobile_lcdcfb.c +++ b/drivers/video/sh_mobile_lcdcfb.c @@ -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) {