aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2008-08-11 10:36:43 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-13 07:15:30 -0200
commite613f8fa5432d4cacaf81615f62b6d25d77947c5 (patch)
tree623b9aa85776fc904034e2dfed2553f25a53dd2b
parent45d011031d745d2c9a21c21d289428cb7f88a2d0 (diff)
V4L/DVB (9140): anysee: unlock I2C-mutex in error case
- unlock I2C-mutex also in error case Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/dvb/dvb-usb/anysee.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/dvb/dvb-usb/anysee.c b/drivers/media/dvb/dvb-usb/anysee.c
index 2f408d2e1ef..f511d105081 100644
--- a/drivers/media/dvb/dvb-usb/anysee.c
+++ b/drivers/media/dvb/dvb-usb/anysee.c
@@ -178,14 +178,14 @@ static int anysee_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msg,
inc = 1;
}
if (ret)
- return ret;
+ break;
i += inc;
}
mutex_unlock(&d->i2c_mutex);
- return i;
+ return ret ? ret : i;
}
static u32 anysee_i2c_func(struct i2c_adapter *adapter)