浏览代码

V4L/DVB (12930): Wrong variable tested

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>
Roel Kluin 15 年之前
父节点
当前提交
ad695510bf
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/media/video/saa7164/saa7164-api.c

+ 1 - 1
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__);