[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1335539820-11232-13-git-send-email-jiang.liu@huawei.com>
Date: Fri, 27 Apr 2012 23:16:53 +0800
From: Jiang Liu <liuj97@...il.com>
To: Yinghai Lu <yinghai@...nel.org>,
Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Don Dutile <ddutile@...hat.com>,
Greg KH <gregkh@...uxfoundation.org>
Cc: Jiang Liu <jiang.liu@...wei.com>,
Keping Chen <chenkeping@...wei.com>,
linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
Jiang Liu <liuj97@...il.com>
Subject: [PATCH v2 12/19] PCI: clean up all resources in error handling path in zt5550_hc_init_one()
From: Jiang Liu <jiang.liu@...wei.com>
Clean up all resources in error handling path in function zt5550_hc_init_one().
Signed-off-by: Jiang Liu <liuj97@...il.com>
---
drivers/pci/hotplug/cpcihp_zt5550.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/pci/hotplug/cpcihp_zt5550.c b/drivers/pci/hotplug/cpcihp_zt5550.c
index 6bf8d2a..8a6f968 100644
--- a/drivers/pci/hotplug/cpcihp_zt5550.c
+++ b/drivers/pci/hotplug/cpcihp_zt5550.c
@@ -257,11 +257,13 @@ static int zt5550_hc_init_one (struct pci_dev *pdev, const struct pci_device_id
if(status != 0) {
err("could not started cPCI hotplug system");
cpci_hp_unregister_bus(bus0);
- goto init_register_error;
+ goto init_start_error;
}
dbg("started cpci hp system");
return 0;
+init_start_error:
+ cpci_hp_unregister_bus(bus0);
init_register_error:
cpci_hp_unregister_controller(&zt5550_hpc);
init_hc_error:
--
1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists