Commit 99d96e4e authored by Manu Abraham's avatar Manu Abraham Committed by Mauro Carvalho Chehab

V4L/DVB (13721): [Mantis] Bug! Before bailing out, Unlock

Thanks to hotwings <user.vdr@gmail.com> for pointing out the bug
Signed-off-by: default avatarManu Abraham <manu@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 51d20db8
...@@ -133,11 +133,15 @@ static int mantis_i2c_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs, in ...@@ -133,11 +133,15 @@ static int mantis_i2c_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs, in
ret = mantis_i2c_write(mantis, &msgs[i]); ret = mantis_i2c_write(mantis, &msgs[i]);
if (ret < 0) if (ret < 0)
return ret; goto bail_out;
} }
mutex_unlock(&mantis->i2c_lock); mutex_unlock(&mantis->i2c_lock);
return num; return num;
bail_out:
mutex_unlock(&mantis->i2c_lock);
return ret;
} }
static u32 mantis_i2c_func(struct i2c_adapter *adapter) static u32 mantis_i2c_func(struct i2c_adapter *adapter)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment