summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2012-04-09 00:31:24 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-14 20:37:52 +0400
commitb1e1179cea0e50ae3fead8c6bd064a985dae8f8b (patch)
treebdf682a4942c572fff549207d7aa1bb36bbaf6b0 /drivers
parentdfea00191aec19dc1115934a3c06e97fd8338e2e (diff)
downloadlinux-b1e1179cea0e50ae3fead8c6bd064a985dae8f8b.tar.xz
[media] mt9m032: fix two dead-locks
Fix a copy-paste typo and a nested locking function call in mt9m032. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/mt9m032.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/video/mt9m032.c b/drivers/media/video/mt9m032.c
index 7636672c3548..645973c5feb0 100644
--- a/drivers/media/video/mt9m032.c
+++ b/drivers/media/video/mt9m032.c
@@ -392,10 +392,11 @@ static int mt9m032_set_pad_format(struct v4l2_subdev *subdev,
}
/* Scaling is not supported, the format is thus fixed. */
- ret = mt9m032_get_pad_format(subdev, fh, fmt);
+ fmt->format = *__mt9m032_get_pad_format(sensor, fh, fmt->which);
+ ret = 0;
done:
- mutex_lock(&sensor->lock);
+ mutex_unlock(&sensor->lock);
return ret;
}