From: Antti Palosaari Date: Mon, 11 Aug 2008 13:36:43 +0000 (-0300) Subject: V4L/DVB (9140): anysee: unlock I2C-mutex in error case X-Git-Tag: v2.6.28-rc1~601^2~38 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=e613f8fa5432d4cacaf81615f62b6d25d77947c5;p=linux-2.6-omap-h63xx.git V4L/DVB (9140): anysee: unlock I2C-mutex in error case - unlock I2C-mutex also in error case Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- 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)