diff options
author | Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | 2010-08-20 04:28:51 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-24 11:20:40 -0200 |
commit | 2896637b86243c39a4f08d15388dcc06130fff29 (patch) | |
tree | ae84e5e65f201a5c31b90f198d6042a0613dc215 /drivers/edac/i7core_edac.c | |
parent | 628c5ddfb08094a5ef9186dc866d09bfcac105c9 (diff) | |
download | linux-stable-2896637b86243c39a4f08d15388dcc06130fff29.tar.gz linux-stable-2896637b86243c39a4f08d15388dcc06130fff29.tar.bz2 linux-stable-2896637b86243c39a4f08d15388dcc06130fff29.zip |
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.c | 4 |
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, 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]) { |