staging: crystalhd: call disable_pci_device() if pci_probe() failed
authorKulikov Vasiliy <segooon@gmail.com>
Mon, 9 Aug 2010 19:51:44 +0000 (23:51 +0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 31 Aug 2010 21:48:07 +0000 (14:48 -0700)
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>
drivers/staging/crystalhd/crystalhd_lnx.c

index fbb80f09a3d9213f85b8091c965a2c2e5642886d..115e79b8b4eb9c29a2d2e0ee7b8e46f7d207707f 100644 (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;
        }