1
0
Fork 0

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: 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>
wifi-calibration
Kulikov Vasiliy 2010-08-10 18:03:19 -07:00 committed by Linus Torvalds
parent bd1688dcdf
commit 44aa80f005
1 changed files with 1 additions and 1 deletions

View File

@ -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 */