mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
Merge branch 'pci/controller/histb'
- Call phy_exit() to clean up if histb_pcie_probe() fails (Christophe JAILLET) * pci/controller/histb: PCI: histb: Fix an error handling path in histb_pcie_probe()
This commit is contained in:
commit
58746a573a
|
|
@ -409,16 +409,21 @@ static int histb_pcie_probe(struct platform_device *pdev)
|
|||
ret = histb_pcie_host_enable(pp);
|
||||
if (ret) {
|
||||
dev_err(dev, "failed to enable host\n");
|
||||
return ret;
|
||||
goto err_exit_phy;
|
||||
}
|
||||
|
||||
ret = dw_pcie_host_init(pp);
|
||||
if (ret) {
|
||||
dev_err(dev, "failed to initialize host\n");
|
||||
return ret;
|
||||
goto err_exit_phy;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_exit_phy:
|
||||
phy_exit(hipcie->phy);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void histb_pcie_remove(struct platform_device *pdev)
|
||||
|
|
@ -427,8 +432,7 @@ static void histb_pcie_remove(struct platform_device *pdev)
|
|||
|
||||
histb_pcie_host_disable(hipcie);
|
||||
|
||||
if (hipcie->phy)
|
||||
phy_exit(hipcie->phy);
|
||||
phy_exit(hipcie->phy);
|
||||
}
|
||||
|
||||
static const struct of_device_id histb_pcie_of_match[] = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user