projects/linux·commit 44aa80f0

edac: i5000: improve handling of pci_enable_device() return value

44aa80f0 · Kulikov Vasiliy <[email protected]> · 2010-08-10 18:03:19 -07:00

-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.

Signed-off-by: Kulikov Vasiliy <[email protected]>
Acked-by: Mauro Carvalho Chehab <[email protected]>
Cc: Jeff Roberson <[email protected]>
Cc: Doug Thompson <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
44aa80f005be88fef940fccdd345b313964768f3
Parents
bd1688dc

Changes

1 files changed · +1 −1

FileStatusAddDelContent
drivers/edac/i5000_edac.cmodified+1−1View file

drivers/edac/i5000_edac.c

View file
diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c
index 996c1bd..a5cefab 100644
--- a/drivers/edac/i5000_edac.c
+++ b/drivers/edac/i5000_edac.c
@@ -1482,7 +1482,7 @@ static int __devinit i5000_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 */