From: Guennadi Liakhovetski Date: Sun, 8 Apr 2012 20:31:24 +0000 (-0300) Subject: [media] mt9m032: fix two dead-locks X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=b1e1179cea0e50ae3fead8c6bd064a985dae8f8b;p=openwrt%2Fstaging%2Fblogic.git [media] mt9m032: fix two dead-locks Fix a copy-paste typo and a nested locking function call in mt9m032. Signed-off-by: Guennadi Liakhovetski Acked-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- 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; }