diff options
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx-i2c.c')
-rw-r--r-- | drivers/media/usb/em28xx/em28xx-i2c.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-i2c.c b/drivers/media/usb/em28xx/em28xx-i2c.c index a19b5c8b56ff..1a9e1e556706 100644 --- a/drivers/media/usb/em28xx/em28xx-i2c.c +++ b/drivers/media/usb/em28xx/em28xx-i2c.c | |||
@@ -507,9 +507,8 @@ static int em28xx_i2c_xfer(struct i2c_adapter *i2c_adap, | |||
507 | if (dev->disconnected) | 507 | if (dev->disconnected) |
508 | return -ENODEV; | 508 | return -ENODEV; |
509 | 509 | ||
510 | rc = rt_mutex_trylock(&dev->i2c_bus_lock); | 510 | if (!rt_mutex_trylock(&dev->i2c_bus_lock)) |
511 | if (rc < 0) | 511 | return -EAGAIN; |
512 | return rc; | ||
513 | 512 | ||
514 | /* Switch I2C bus if needed */ | 513 | /* Switch I2C bus if needed */ |
515 | if (bus != dev->cur_i2c_bus && | 514 | if (bus != dev->cur_i2c_bus && |