mirror of https://gitee.com/openkylin/linux.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 <segooon@gmail.com> Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue