[PATCH -next] [media] coda: fix missing unlock on error in coda_stop_streaming()

Wei Yongjun weiyj.lk at gmail.com
Tue Jun 18 15:00:17 EST 2013


From: Wei Yongjun <yongjun_wei at trendmicro.com.cn>

Add the missing unlock before return from function coda_stop_streaming()
in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei at trendmicro.com.cn>
---
 drivers/media/platform/coda.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
index df4ada88..2c3cd17 100644
--- a/drivers/media/platform/coda.c
+++ b/drivers/media/platform/coda.c
@@ -1347,6 +1347,7 @@ static int coda_stop_streaming(struct vb2_queue *q)
 	if (coda_command_sync(ctx, CODA_COMMAND_SEQ_END)) {
 		v4l2_err(&dev->v4l2_dev,
 			 "CODA_COMMAND_SEQ_END failed\n");
+		mutex_unlock(&dev->coda_mutex);
 		return -ETIMEDOUT;
 	}
 	mutex_unlock(&dev->coda_mutex);



More information about the devicetree-discuss mailing list