summaryrefslogtreecommitdiff
path: root/drivers/media/usb/cx231xx/cx231xx-i2c.c
diff options
context:
space:
mode:
authorPeter Rosin <peda@axentia.se>2017-07-31 16:38:50 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-08-09 17:15:03 +0300
commit54b1b41f8be7017950d7cdfe8834ed6361d0e33a (patch)
tree91c5e008c99fdee4cdf8172ab80dbca1cfaa388d /drivers/media/usb/cx231xx/cx231xx-i2c.c
parentc6e3bdb8e6a1f0007c6ea1502a46552b789c79f3 (diff)
downloadlinux-54b1b41f8be7017950d7cdfe8834ed6361d0e33a.tar.xz
media: cx231xx: fail probe if i2c_add_adapter fails
While at it, change the type of the previously always-zero i2c_rc member to int, matching the returned type from i2c_add_adapter. Signed-off-by: Peter Rosin <peda@axentia.se> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/usb/cx231xx/cx231xx-i2c.c')
-rw-r--r--drivers/media/usb/cx231xx/cx231xx-i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-i2c.c b/drivers/media/usb/cx231xx/cx231xx-i2c.c
index 8d95b1154e12..3a0c45ffd40f 100644
--- a/drivers/media/usb/cx231xx/cx231xx-i2c.c
+++ b/drivers/media/usb/cx231xx/cx231xx-i2c.c
@@ -538,7 +538,7 @@ int cx231xx_i2c_register(struct cx231xx_i2c *bus)
bus->i2c_adap.algo_data = bus;
i2c_set_adapdata(&bus->i2c_adap, &dev->v4l2_dev);
- i2c_add_adapter(&bus->i2c_adap);
+ bus->i2c_rc = i2c_add_adapter(&bus->i2c_adap);
if (0 != bus->i2c_rc)
dev_warn(dev->dev,