]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/pci/hotplug/shpchp_core.c
SHPCHP: fix __must_check warnings
[linux-2.6-omap-h63xx.git] / drivers / pci / hotplug / shpchp_core.c
index a14e7de1984621cd9281751df06cc0624fee5d87..235c18a22393d04e0ba86ec5f511d086149f6d75 100644 (file)
@@ -449,10 +449,14 @@ static int shpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                ctrl->speed = PCI_SPEED_33MHz;
        }
 
-       shpchp_create_ctrl_files(ctrl);
+       rc = shpchp_create_ctrl_files(ctrl);
+       if (rc)
+               goto err_cleanup_slots;
 
        return 0;
 
+err_cleanup_slots:
+       cleanup_slots(ctrl);
 err_out_release_ctlr:
        ctrl->hpc_ops->release_ctlr(ctrl);
 err_out_free_ctrl: