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>
This commit is contained in:
Kulikov Vasiliy 2010-08-09 23:51:44 +04:00 committed by Greg Kroah-Hartman
parent b6cdc4056f
commit 036b00e091
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}