Skip to contentSkip to conversation

V4L/DVB (12930): Wrong variable tested

PATCH New Roel Kluin 1 participant 1 message Jan 3, 2010 Media (V4L/DVB)

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 V4L/DVB (12930): Wrong variable tested

The return of saa7164_i2caddr_to_reglen() was not tested.

---
 drivers/media/video/saa7164/saa7164-api.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/video/saa7164/saa7164-api.c +1 -1
index 6f094a9..1d487c1 100644
@@ -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__);