Skip to content

Commit

Permalink
[media] tea6415c: return -EIO if i2c_check_functionality fails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Axel Lin authored and Mauro Carvalho Chehab committed Dec 29, 2010
1 parent 1ce6a14 commit 76e4a9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/tea6415c.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ static int tea6415c_probe(struct i2c_client *client,

/* let's see whether this adapter can support what we need */
if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_WRITE_BYTE))
return 0;
return -EIO;

v4l_info(client, "chip found @ 0x%x (%s)\n",
client->addr << 1, client->adapter->name);
Expand Down

0 comments on commit 76e4a9a

Please sign in to comment.