Browse files

[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.

Signed-off-by: Sylwester Nawrocki <>
Signed-off-by: Kyungmin Park <>
Signed-off-by: Mauro Carvalho Chehab <>
  • Loading branch information...
1 parent 910a5f2 commit e985dbf7d93e2a3e114b4525413e50f83613e0cb Sylwester Nawrocki committed with Mauro Carvalho Chehab Apr 21, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 drivers/media/video/s5p-fimc/fimc-capture.c
@@ -1383,7 +1383,7 @@ static int fimc_subdev_set_crop(struct v4l2_subdev *sd,
fimc_capture_try_crop(ctx, r, crop->pad);
if (crop->which == V4L2_SUBDEV_FORMAT_TRY) {
- mutex_lock(&fimc->lock);
+ mutex_unlock(&fimc->lock);
*v4l2_subdev_get_try_crop(fh, crop->pad) = *r;
return 0;

0 comments on commit e985dbf

Please sign in to comment.