aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/s5p-fimc
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2012-04-21 17:46:30 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-08 08:07:42 -0400
commite985dbf7d93e2a3e114b4525413e50f83613e0cb (patch)
tree7f258fa413be94cf1f7d9ac24d32c1d99f9ba67b /drivers/media/video/s5p-fimc
parent910a5f2e9642d5be373beae3d29e1c4a3bc7d83b (diff)
[media] s5p-fimc: Fix locking in subdev set_crop op
When setting TRY crop on the sub-device the mutex was erroneously acquired rather than released on exit path. This bug is present in kernels starting from v3.2. Cc: stable@vger.kernel.org Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/s5p-fimc')
-rw-r--r--drivers/media/video/s5p-fimc/fimc-capture.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c
index b06efd208328..fcf3a14d013e 100644
--- a/drivers/media/video/s5p-fimc/fimc-capture.c
+++ b/drivers/media/video/s5p-fimc/fimc-capture.c
@@ -1383,7 +1383,7 @@ static int fimc_subdev_set_crop(struct v4l2_subdev *sd,
1383 fimc_capture_try_crop(ctx, r, crop->pad); 1383 fimc_capture_try_crop(ctx, r, crop->pad);
1384 1384
1385 if (crop->which == V4L2_SUBDEV_FORMAT_TRY) { 1385 if (crop->which == V4L2_SUBDEV_FORMAT_TRY) {
1386 mutex_lock(&fimc->lock); 1386 mutex_unlock(&fimc->lock);
1387 *v4l2_subdev_get_try_crop(fh, crop->pad) = *r; 1387 *v4l2_subdev_get_try_crop(fh, crop->pad) = *r;
1388 return 0; 1388 return 0;
1389 } 1389 }