Skip to content

Commit

Permalink
i7core_edac: Call pci_dev_put() when alloc_i7core_dev() failed
Browse files Browse the repository at this point in the history
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hidetoshi Seto authored and Mauro Carvalho Chehab committed Oct 24, 2010
1 parent 628c5dd commit 2896637
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/edac/i7core_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]) {
Expand Down

0 comments on commit 2896637

Please sign in to comment.