Commit 2896637b authored by Hidetoshi Seto's avatar Hidetoshi Seto Committed by Mauro Carvalho Chehab

i7core_edac: Call pci_dev_put() when alloc_i7core_dev() failed

Signed-off-by: default avatarHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 628c5ddf
......@@ -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]) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment