Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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
+1
drivers/media/i2c/ov7251.c
··· 1378 1378 1379 1379 err_power_down: 1380 1380 pm_runtime_put_noidle(ov7251->dev); 1381 + mutex_unlock(&ov7251->lock); 1381 1382 return ret; 1382 1383 } 1383 1384