提交 2896637b 编写于 作者: H Hidetoshi Seto 提交者: Mauro Carvalho Chehab

i7core_edac: Call pci_dev_put() when alloc_i7core_dev() failed

Signed-off-by: NHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 628c5ddf
...@@ -1384,8 +1384,10 @@ static int i7core_get_onedevice(struct pci_dev **prev, ...@@ -1384,8 +1384,10 @@ static int i7core_get_onedevice(struct pci_dev **prev,
i7core_dev = get_i7core_dev(socket); i7core_dev = get_i7core_dev(socket);
if (!i7core_dev) { if (!i7core_dev) {
i7core_dev = alloc_i7core_dev(socket, table); i7core_dev = alloc_i7core_dev(socket, table);
if (!i7core_dev) if (!i7core_dev) {
pci_dev_put(pdev);
return -ENOMEM; return -ENOMEM;
}
} }
if (i7core_dev->pdev[devno]) { if (i7core_dev->pdev[devno]) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册