summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx25840
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/cx25840')
-rw-r--r--linux/drivers/media/video/cx25840/cx25840-core.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/linux/drivers/media/video/cx25840/cx25840-core.c b/linux/drivers/media/video/cx25840/cx25840-core.c
index 89fec724c..3f249b025 100644
--- a/linux/drivers/media/video/cx25840/cx25840-core.c
+++ b/linux/drivers/media/video/cx25840/cx25840-core.c
@@ -1099,6 +1099,10 @@ static int cx25840_probe(struct i2c_client *client)
u32 id;
u16 device_id;
+ /* Check if the adapter supports the needed features */
+ if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
+ return -EIO;
+
v4l_dbg(1, cx25840_debug, client, "detecting cx25840 client on address 0x%x\n", client->addr << 1);
device_id = cx25840_read(client, 0x101) << 8;
@@ -1114,7 +1118,7 @@ static int cx25840_probe(struct i2c_client *client)
}
else {
v4l_dbg(1, cx25840_debug, client, "cx25840 not found\n");
- return 0;
+ return -ENODEV;
}
state = kzalloc(sizeof(struct cx25840_state), GFP_KERNEL);