* [PATCH 1/2] edac: i5000: carefull error handling
@ 2010-07-21 19:07 Kulikov Vasiliy
0 siblings, 0 replies; only message in thread
From: Kulikov Vasiliy @ 2010-07-21 19:07 UTC (permalink / raw)
To: kernel-janitors
Cc: Mauro Carvalho Chehab, linux-kernel, Tamas Vincze, Doug Thompson,
Andrew Morton, bluesmoke-devel
-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>
---
drivers/edac/i5000_edac.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c
index 996c1bd..a5cefab 100644
--- a/drivers/edac/i5000_edac.c
+++ b/drivers/edac/i5000_edac.c
@@ -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 */
--
1.7.0.4
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-07-21 19:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-21 19:07 [PATCH 1/2] edac: i5000: carefull error handling Kulikov Vasiliy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).