From b425d5c82d9b1fcf788688e556e4dfeca76604da Mon Sep 17 00:00:00 2001 From: Kulikov Vasiliy Date: Tue, 10 Aug 2010 18:03:20 -0700 Subject: 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 Acked-by: Mauro Carvalho Chehab Cc: Jeff Roberson Cc: Doug Thompson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/edac/i5400_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/edac/i5400_edac.c b/drivers/edac/i5400_edac.c index 010c1d6526f..38a9be9e1c7 100644 --- a/drivers/edac/i5400_edac.c +++ b/drivers/edac/i5400_edac.c @@ -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 */ -- cgit v1.2.3-70-g09d2