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-Url: https://git.stricted.de/?a=commitdiff_plain;h=e613f8fa5432d4cacaf81615f62b6d25d77947c5;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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 2f408d2e1ef3..f511d105081f 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)