From ad695510bf27a4e73e0d04d48d80c0b8389f17d2 Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Sun, 3 Jan 2010 14:04:42 -0300 Subject: V4L/DVB (12930): Wrong variable tested The return of saa7164_i2caddr_to_reglen() was not tested. Cc: Steven Toth Signed-off-by: Roel Kluin Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/saa7164/saa7164-api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media') diff --git a/drivers/media/video/saa7164/saa7164-api.c b/drivers/media/video/saa7164/saa7164-api.c index 6f094a9..1d487c1 100644 --- a/drivers/media/video/saa7164/saa7164-api.c +++ b/drivers/media/video/saa7164/saa7164-api.c @@ -523,7 +523,7 @@ int saa7164_api_i2c_write(struct saa7164_i2c *bus, u8 addr, u32 datalen, } reglen = saa7164_i2caddr_to_reglen(bus, addr); - if (unitid < 0) { + if (reglen < 0) { printk(KERN_ERR "%s() error, cannot translate regaddr to reglen\n", __func__); -- cgit v1.1