Commit b425d5c82d9b1fcf788688e556e4dfeca76604da

Authored by Kulikov Vasiliy
Committed by Linus Torvalds
1 parent 44aa80f005

edac: i5400: 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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/edac/i5400_edac.c
... ... @@ -1348,7 +1348,7 @@
1348 1348  
1349 1349 /* wake up device */
1350 1350 rc = pci_enable_device(pdev);
1351   - if (rc == -EIO)
  1351 + if (rc)
1352 1352 return rc;
1353 1353  
1354 1354 /* now probe and enable the device */