Skip to contentSkip to conversation

edac: i5400: carefull error handling

PATCH New Kulikov Vasiliy 1 participant 1 message Jul 21, 2010

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

PATCH 2/2 edac: i5400: carefull error handling

-EIO is not the only error code that pci_enable_device() may return, also the set of errors can be enhanced in future. We should compare return code with zero, not with concrete error value.

---
 drivers/edac/i5400_edac.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/edac/i5400_edac.c +1 -1
index 010c1d6..38a9be9 100644
@@ -1348,7 +1348,7 @@ static int __devinit i5400_init_one(struct pci_dev *pdev,
 
 	/* wake up device */
 	rc = pci_enable_device(pdev);
-	if (rc = -EIO)
+	if (rc)
 		return rc;
 
 	/* now probe and enable the device */
Signature · 1 line
1.7.0.4