Skip to content

Commit

Permalink
i7core_edac: return -ENODEV when devices were already probed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mauro Carvalho Chehab committed Oct 24, 2010
1 parent 3c52cc5 commit 76a7bd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/edac/i7core_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;

Expand Down

0 comments on commit 76a7bd8

Please sign in to comment.