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:
committed by
Greg Kroah-Hartman
parent
b6cdc4056f
commit
036b00e091
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user