Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Kulikov Vasiliy and committed by
Linus Torvalds
44aa80f0 bd1688dc

+1 -1
+1 -1
drivers/edac/i5000_edac.c
··· 1482 1482 1483 1483 /* wake up device */ 1484 1484 rc = pci_enable_device(pdev); 1485 - if (rc == -EIO) 1485 + if (rc) 1486 1486 return rc; 1487 1487 1488 1488 /* now probe and enable the device */