diff options
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/i7core_edac.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c index 3542e8c0a63..2e2db3c083e 100644 --- a/drivers/edac/i7core_edac.c +++ b/drivers/edac/i7core_edac.c @@ -1384,8 +1384,10 @@ static int i7core_get_onedevice(struct pci_dev **prev, i7core_dev = get_i7core_dev(socket); if (!i7core_dev) { i7core_dev = alloc_i7core_dev(socket, table); - if (!i7core_dev) + if (!i7core_dev) { + pci_dev_put(pdev); return -ENOMEM; + } } if (i7core_dev->pdev[devno]) { |