aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac
diff options
context:
space:
mode:
authorHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>2010-08-20 03:28:51 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-24 09:20:40 -0400
commit2896637b86243c39a4f08d15388dcc06130fff29 (patch)
treeae84e5e65f201a5c31b90f198d6042a0613dc215 /drivers/edac
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')
-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 3542e8c0a63f..2e2db3c083ed 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,
1384 i7core_dev = get_i7core_dev(socket); 1384 i7core_dev = get_i7core_dev(socket);
1385 if (!i7core_dev) { 1385 if (!i7core_dev) {
1386 i7core_dev = alloc_i7core_dev(socket, table); 1386 i7core_dev = alloc_i7core_dev(socket, table);
1387 if (!i7core_dev) 1387 if (!i7core_dev) {
1388 pci_dev_put(pdev);
1388 return -ENOMEM; 1389 return -ENOMEM;
1390 }
1389 } 1391 }
1390 1392
1391 if (i7core_dev->pdev[devno]) { 1393 if (i7core_dev->pdev[devno]) {