summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/media/usb/em28xx/em28xx-i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/media/usb/em28xx/em28xx-i2c.c')
-rw-r--r--kernel/drivers/media/usb/em28xx/em28xx-i2c.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/drivers/media/usb/em28xx/em28xx-i2c.c b/kernel/drivers/media/usb/em28xx/em28xx-i2c.c
index a19b5c8b5..1a9e1e556 100644
--- a/kernel/drivers/media/usb/em28xx/em28xx-i2c.c
+++ b/kernel/drivers/media/usb/em28xx/em28xx-i2c.c
@@ -507,9 +507,8 @@ static int em28xx_i2c_xfer(struct i2c_adapter *i2c_adap,
if (dev->disconnected)
return -ENODEV;
- rc = rt_mutex_trylock(&dev->i2c_bus_lock);
- if (rc < 0)
- return rc;
+ if (!rt_mutex_trylock(&dev->i2c_bus_lock))
+ return -EAGAIN;
/* Switch I2C bus if needed */
if (bus != dev->cur_i2c_bus &&