From 036b00e0917a867a018c583aa86aa66affb9321c Mon Sep 17 00:00:00 2001 From: Kulikov Vasiliy Date: Mon, 9 Aug 2010 23:51:44 +0400 Subject: [PATCH] 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 --- drivers/staging/crystalhd/crystalhd_lnx.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.20.1