Skip to content

Commit

Permalink
edac: i5400: 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 <segooon@gmail.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Jeff Roberson <jroberson@jroberson.net>
Cc: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Kulikov Vasiliy authored and Linus Torvalds committed Aug 11, 2010
1 parent 44aa80f commit b425d5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/edac/i5400_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit b425d5c

Please sign in to comment.