Skip to contentSkip to conversation

cx88: fix error return code in cx8802_dvb_probe()

PATCH New Wei Yongjun 1 participant 1 message Sep 21, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cx88: fix error return code in cx8802_dvb_probe()

From: Wei Yongjun <[email protected]>

Fix to return error code -ENODEV from the error handling case instead of 0(err maybe overwrited to 0 in the for loop), as done elsewhere in this function.

---
 drivers/media/pci/cx88/cx88-dvb.c | 1 +
 1 file changed, 1 insertion(+)
drivers/media/pci/cx88/cx88-dvb.c +1 -0
index ac2392d..d76a175 100644
@@ -1779,6 +1779,7 @@ static int cx8802_dvb_probe(struct cx8802_driver *drv)
 		if (fe == NULL) {
 			printk(KERN_ERR "%s() failed to get frontend(%d)\n",
 					__func__, i);
+			err = -ENODEV;
 			goto fail_probe;
 		}
 		q = &fe->dvb.dvbq;