Skip to content

Commit 76a7bd8

Browse files
author
Mauro Carvalho Chehab
committed
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 <mchehab@redhat.com>
1 parent 3c52cc5 commit 76a7bd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/edac/i7core_edac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2046,7 +2046,7 @@ static int __devinit i7core_probe(struct pci_dev *pdev,
20462046
*/
20472047
if (unlikely(probed >= 1)) {
20482048
mutex_unlock(&i7core_edac_lock);
2049-
return -EINVAL;
2049+
return -ENODEV;
20502050
}
20512051
probed++;
20522052

0 commit comments

Comments
 (0)