aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tvp514x.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2009-11-04 13:35:09 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 15:41:13 -0500
commit6f901a991991fd3c9ac51bc7234a6706ef17ddfe (patch)
treea920601fb01d5b5e81cd3cb3c1f1cb870c3649b5 /drivers/media/video/tvp514x.c
parent480be1851aebcb0b9c5b0fb9acefe5da97cc702a (diff)
V4L/DVB (13292): tvp514x: recognize the error case in tvp514x_read_reg()
i2c_smbus_read_byte_data() returns a negative value on error. It is very likely to be != -1 (-EPERM). Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Vaibhav Hiremath <hvaibhav@ti.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/tvp514x.c')
-rw-r--r--drivers/media/video/tvp514x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/tvp514x.c b/drivers/media/video/tvp514x.c
index 244372627df2..26b4e718cd6d 100644
--- a/drivers/media/video/tvp514x.c
+++ b/drivers/media/video/tvp514x.c
@@ -272,7 +272,7 @@ static int tvp514x_read_reg(struct v4l2_subdev *sd, u8 reg)
272read_again: 272read_again:
273 273
274 err = i2c_smbus_read_byte_data(client, reg); 274 err = i2c_smbus_read_byte_data(client, reg);
275 if (err == -1) { 275 if (err < 0) {
276 if (retry <= I2C_RETRY_COUNT) { 276 if (retry <= I2C_RETRY_COUNT) {
277 v4l2_warn(sd, "Read: retry ... %d\n", retry); 277 v4l2_warn(sd, "Read: retry ... %d\n", retry);
278 retry++; 278 retry++;