Skip to contentSkip to conversation

cx231xx: cleanup dvb_attach() return value handling

PATCH New Németh Márton 1 participant 1 message Jan 16, 2010 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cx231xx: cleanup dvb_attach() return value handling

From: Márton Németh <[email protected]>

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

---

linux/drivers/media/video/cx231xx/cx231xx-dvb.c +4 -4
diff -r 5bcdcc072b6d linux/drivers/media/video/cx231xx/cx231xx-dvb.c
@@ -465,9 +465,9 @@
 		/* define general-purpose callback pointer */
 		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,
-			       &cnxt_rde250_tunerconfig) < 0) {
+			       &cnxt_rde250_tunerconfig)) {
 			result = -EINVAL;
 			goto out_free;
 		}
@@ -487,9 +487,9 @@
 		/* define general-purpose callback pointer */
 		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,
-			       &cnxt_rde250_tunerconfig) < 0) {
+			       &cnxt_rde250_tunerconfig)) {
 			result = -EINVAL;
 			goto out_free;
 		}