V4L/DVB (12930): Wrong variable tested
authorRoel Kluin <roel.kluin@gmail.com>
Sun, 3 Jan 2010 17:04:42 +0000 (14:04 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 26 Feb 2010 18:10:34 +0000 (15:10 -0300)
The return of saa7164_i2caddr_to_reglen() was not tested.

Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/saa7164/saa7164-api.c

index 6f094a96ac810afbfbad67667b50bcd70cdca7d9..1d487c1503408decf21a9f407ceff3d6fbc048e9 100644 (file)
@@ -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__);