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.karo-electronics.de/?a=commitdiff_plain;h=036b00e0917a867a018c583aa86aa66affb9321c;p=linux-beck.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; }