[media] omap3isp: Add missing mutex_destroy() calls
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Thu, 22 Sep 2011 20:09:26 +0000 (17:09 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 3 Nov 2011 20:31:31 +0000 (18:31 -0200)
Mutexes must be destroyed with mutex_destroy(). Add missing calls in the
modules cleanup handlers.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/omap3isp/isp.c
drivers/media/video/omap3isp/ispccdc.c
drivers/media/video/omap3isp/ispstat.c
drivers/media/video/omap3isp/ispvideo.c

index 678e1252047a7092b9471636d76e4a41270cdd6b..c8f147ef320dae5d496aa57febd2440ace303a52 100644 (file)
@@ -2210,6 +2210,8 @@ error:
        regulator_put(isp->isp_csiphy2.vdd);
        regulator_put(isp->isp_csiphy1.vdd);
        platform_set_drvdata(pdev, NULL);
+
+       mutex_destroy(&isp->isp_mutex);
        kfree(isp);
 
        return ret;
index c30cc59d7032267fe7e6256faf5fcb33e489dd20..3a43be2f54521578f6df8cc541f45a18080c5408 100644 (file)
@@ -2297,4 +2297,6 @@ void omap3isp_ccdc_cleanup(struct isp_device *isp)
 
        if (ccdc->fpc.fpcaddr != 0)
                omap_iommu_vfree(isp->domain, isp->iommu, ccdc->fpc.fpcaddr);
+
+       mutex_destroy(&ccdc->ioctl_lock);
 }
index b124326d1e7f68256f58c1adb473bd7d6eb7bdcc..28b7cc61cba6a5208f2b34c38843e3fe12ee751c 100644 (file)
@@ -1087,6 +1087,7 @@ int omap3isp_stat_init(struct ispstat *stat, const char *name,
 void omap3isp_stat_cleanup(struct ispstat *stat)
 {
        media_entity_cleanup(&stat->subdev.entity);
+       mutex_destroy(&stat->ioctl_lock);
        isp_stat_bufs_free(stat);
        kfree(stat->buf);
 }
index 7d74ebbdb63bda386bfb49c8e52fa22f625cf91b..d1000723c5ae0040f45d2f283a0df45de4ee8a01 100644 (file)
@@ -1328,6 +1328,8 @@ int omap3isp_video_init(struct isp_video *video, const char *name)
 void omap3isp_video_cleanup(struct isp_video *video)
 {
        media_entity_cleanup(&video->video.entity);
+       mutex_destroy(&video->stream_lock);
+       mutex_destroy(&video->mutex);
 }
 
 int omap3isp_video_register(struct isp_video *video, struct v4l2_device *vdev)