Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

i7core_edac: Call pci_dev_put() when alloc_i7core_dev() failed

parent 628c5ddf
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1384,9 +1384,11 @@ 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]) {
		i7core_printk(KERN_ERR,