diff options
author | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-05-13 18:06:40 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-05-17 09:54:26 +0200 |
commit | 4d52db40c76fb2afa687feefcf765458bb2c9cae (patch) | |
tree | 18e64f9575e974bd3238ca29f10fdc01d2324aee /drivers/media | |
parent | 1b598f413c7aaa2126c261c5024eeb7a7f9531e9 (diff) | |
download | linux-4d52db40c76fb2afa687feefcf765458bb2c9cae.tar.bz2 |
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>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/i2c/ov7251.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/i2c/ov7251.c b/drivers/media/i2c/ov7251.c index 4867dc86cd2e..0e7be15bc20a 100644 --- a/drivers/media/i2c/ov7251.c +++ b/drivers/media/i2c/ov7251.c @@ -1378,6 +1378,7 @@ unlock_out: err_power_down: pm_runtime_put_noidle(ov7251->dev); + mutex_unlock(&ov7251->lock); return ret; } |