Commit 44aa80f0 authored by Kulikov Vasiliy's avatar Kulikov Vasiliy Committed by Linus Torvalds

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

-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: default avatarKulikov Vasiliy <segooon@gmail.com>
Acked-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
Cc: Jeff Roberson <jroberson@jroberson.net>
Cc: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent bd1688dc
...@@ -1482,7 +1482,7 @@ static int __devinit i5000_init_one(struct pci_dev *pdev, ...@@ -1482,7 +1482,7 @@ static int __devinit i5000_init_one(struct pci_dev *pdev,
/* wake up device */ /* wake up device */
rc = pci_enable_device(pdev); rc = pci_enable_device(pdev);
if (rc == -EIO) if (rc)
return rc; return rc;
/* now probe and enable the device */ /* now probe and enable the device */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment