Browse Source

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 <segooon@gmail.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kulikov Vasiliy 15 years ago
parent
commit
036b00e091
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/staging/crystalhd/crystalhd_lnx.c

+ 1 - 0
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;
 	}