aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/dvb/mantis
diff options
context:
space:
mode:
authorManu Abraham <abraham.manu@gmail.com>2009-12-04 04:40:16 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-01-17 11:55:31 -0200
commit99d96e4e9202aa046e3e2be1813ff59c84e67608 (patch)
tree09261489cb50f8672931b75218e5859e7731a32d /drivers/media/dvb/mantis
parent51d20db8bb9c5a14ac2320664289f13bd52625c6 (diff)
V4L/DVB (13721): [Mantis] Bug! Before bailing out, Unlock
Thanks to hotwings <user.vdr@gmail.com> for pointing out the bug Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/mantis')
-rw-r--r--drivers/media/dvb/mantis/mantis_i2c.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/dvb/mantis/mantis_i2c.c b/drivers/media/dvb/mantis/mantis_i2c.c
index 005df1e90a1..45d9e6bd962 100644
--- a/drivers/media/dvb/mantis/mantis_i2c.c
+++ b/drivers/media/dvb/mantis/mantis_i2c.c
@@ -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]);
if (ret < 0)
- return ret;
+ goto bail_out;
}
mutex_unlock(&mantis->i2c_lock);
return num;
+
+bail_out:
+ mutex_unlock(&mantis->i2c_lock);
+ return ret;
}
static u32 mantis_i2c_func(struct i2c_adapter *adapter)