aboutsummaryrefslogtreecommitdiff
path: root/drivers/edac/i7core_edac.c
diff options
context:
space:
mode:
authorHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>2010-08-20 04:28:51 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-24 11:20:40 -0200
commit2896637b86243c39a4f08d15388dcc06130fff29 (patch)
treeae84e5e65f201a5c31b90f198d6042a0613dc215 /drivers/edac/i7core_edac.c
parent628c5ddfb08094a5ef9186dc866d09bfcac105c9 (diff)
i7core_edac: Call pci_dev_put() when alloc_i7core_dev() failed
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac/i7core_edac.c')
-rw-r--r--drivers/edac/i7core_edac.c4
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]) {