aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tea6415c.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2010-11-01 05:25:39 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-29 05:16:39 -0500
commit76e4a9a7164263d8ffe816920f84a91e7dfee444 (patch)
treeee7b21f7dd6819bfe813363bf6b3530c7079b3b5 /drivers/media/video/tea6415c.c
parent1ce6a1433572c650247480e1bbbca6bd61db7874 (diff)
[media] tea6415c: return -EIO if i2c_check_functionality fails
If the adapter does not support I2C_FUNC_SMBUS_WRITE_BYTE, return -EIO instead of 0. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/tea6415c.c')
-rw-r--r--drivers/media/video/tea6415c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/tea6415c.c b/drivers/media/video/tea6415c.c
index 3e99cea8e4dc..19621ed523ec 100644
--- a/drivers/media/video/tea6415c.c
+++ b/drivers/media/video/tea6415c.c
@@ -148,7 +148,7 @@ static int tea6415c_probe(struct i2c_client *client,
148 148
149 /* let's see whether this adapter can support what we need */ 149 /* let's see whether this adapter can support what we need */
150 if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_WRITE_BYTE)) 150 if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_WRITE_BYTE))
151 return 0; 151 return -EIO;
152 152
153 v4l_info(client, "chip found @ 0x%x (%s)\n", 153 v4l_info(client, "chip found @ 0x%x (%s)\n",
154 client->addr << 1, client->adapter->name); 154 client->addr << 1, client->adapter->name);