From: Kulikov Vasiliy Date: Mon, 9 Aug 2010 19:51:44 +0000 (+0400) Subject: staging: crystalhd: call disable_pci_device() if pci_probe() failed X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=036b00e0917a867a018c583aa86aa66affb9321c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: crystalhd: call disable_pci_device() if pci_probe() failed Driver should call disable_pci_device() if it returns from pci_probe() with error. Signed-off-by: Kulikov Vasiliy Acked-by: Jarod Wilson Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/crystalhd/crystalhd_lnx.c b/drivers/staging/crystalhd/crystalhd_lnx.c index fbb80f09a3d9..115e79b8b4eb 100644 --- a/drivers/staging/crystalhd/crystalhd_lnx.c +++ b/drivers/staging/crystalhd/crystalhd_lnx.c @@ -570,6 +570,7 @@ static int __devinit chd_dec_pci_probe(struct pci_dev *pdev, rc = chd_pci_reserve_mem(pinfo); if (rc) { BCMLOG_ERR("Failed to setup memory regions.\n"); + pci_disable_device(pdev); return -ENOMEM; }