edac: i5000: improve handling of pci_enable_device() return value
authorKulikov Vasiliy <segooon@gmail.com>
Wed, 11 Aug 2010 01:03:19 +0000 (18:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Aug 2010 15:59:21 +0000 (08:59 -0700)
-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>
drivers/edac/i5000_edac.c

index 996c1bdb5a34379c474d7c1100aabeb419f30996..a5cefab8d65d029339dbef50fd3f2dd5664c6db3 100644 (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 */