aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/dvb/mantis
diff options
context:
space:
mode:
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)