From: Mauro Carvalho Chehab Date: Sun, 24 Oct 2010 13:36:19 +0000 (-0200) Subject: i7core_edac: return -ENODEV when devices were already probed X-Git-Tag: v2.6.37-rc1~108^2 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=76a7bd81130646459dfded1845e0d511488a6afa;hp=3c52cc57ccd5c99441368d5e66be36681ce90e72 i7core_edac: return -ENODEV when devices were already probed Due to the nature of i7core, we need to probe and attach all PCI devices used by this driver during the first time probe is called. However, PCI core will call the probe routine one time for each CPU socket. If we return -EINVAL to those calls, it would seem that the driver fails, when, in fact, there's no more devices left to initialize. Changing the return code to -ENODEV solves this issue. Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c index e3404b2bbaa2..362861c15779 100644 --- a/drivers/edac/i7core_edac.c +++ b/drivers/edac/i7core_edac.c @@ -2046,7 +2046,7 @@ static int __devinit i7core_probe(struct pci_dev *pdev, */ if (unlikely(probed >= 1)) { mutex_unlock(&i7core_edac_lock); - return -EINVAL; + return -ENODEV; } probed++;