Skip to content

Commit 4d52db4

Browse files
committed
media: ov7251: fix mutex lock unbalance
As reported by smatch/sparse: drivers/media/i2c/ov7251.c:1381 ov7251_s_stream() warn: inconsistent returns '&ov7251->lock'. Locked on : 1381 Unlocked on: 1377 There's a lock unbalance at this routine, as it keeps the lock on certain errors. Fix it. Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
1 parent 1b598f4 commit 4d52db4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/media/i2c/ov7251.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1378,6 +1378,7 @@ static int ov7251_s_stream(struct v4l2_subdev *subdev, int enable)
13781378

13791379
err_power_down:
13801380
pm_runtime_put_noidle(ov7251->dev);
1381+
mutex_unlock(&ov7251->lock);
13811382
return ret;
13821383
}
13831384

0 commit comments

Comments
 (0)