瀏覽代碼

V4L/DVB: cx231xx: cleanup dvb_attach() return value handling

Remove the following sparse error (see "make C=1"):
 * error: incompatible types for operation (<)
       left side has type struct dvb_frontend *
       right side has type int

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Márton Németh 15 年之前
父節點
當前提交
d5abcc784f
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      drivers/media/video/cx231xx/cx231xx-dvb.c

+ 4 - 4
drivers/media/video/cx231xx/cx231xx-dvb.c

@@ -464,9 +464,9 @@ static int dvb_init(struct cx231xx *dev)
 		/* define general-purpose callback pointer */
 		/* define general-purpose callback pointer */
 		dvb->frontend->callback = cx231xx_tuner_callback;
 		dvb->frontend->callback = cx231xx_tuner_callback;
 
 
-		if (dvb_attach(xc5000_attach, dev->dvb->frontend,
+		if (!dvb_attach(xc5000_attach, dev->dvb->frontend,
 			       &dev->i2c_bus[1].i2c_adap,
 			       &dev->i2c_bus[1].i2c_adap,
-			       &cnxt_rde250_tunerconfig) < 0) {
+			       &cnxt_rde250_tunerconfig)) {
 			result = -EINVAL;
 			result = -EINVAL;
 			goto out_free;
 			goto out_free;
 		}
 		}
@@ -486,9 +486,9 @@ static int dvb_init(struct cx231xx *dev)
 		/* define general-purpose callback pointer */
 		/* define general-purpose callback pointer */
 		dvb->frontend->callback = cx231xx_tuner_callback;
 		dvb->frontend->callback = cx231xx_tuner_callback;
 
 
-		if (dvb_attach(xc5000_attach, dev->dvb->frontend,
+		if (!dvb_attach(xc5000_attach, dev->dvb->frontend,
 			       &dev->i2c_bus[1].i2c_adap,
 			       &dev->i2c_bus[1].i2c_adap,
-			       &cnxt_rde250_tunerconfig) < 0) {
+			       &cnxt_rde250_tunerconfig)) {
 			result = -EINVAL;
 			result = -EINVAL;
 			goto out_free;
 			goto out_free;
 		}
 		}