Skip to content

Commit

Permalink
edac: i5000: improve handling of pci_enable_device() return value
Browse files Browse the repository at this point in the history
-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]>
  • Loading branch information
segoon authored and torvalds committed Aug 11, 2010
1 parent bd1688d commit 44aa80f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/edac/i5000_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 44aa80f

Please sign in to comment.