mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
Merge branch 'pci/controller/dwc-meson'
- Propagate devm_add_action_or_reset() failure to fix probe error path (Shuvam Pandey) - Add a .remove() callback to deinitialize the host bridge and power off the PHY (Shuvam Pandey) * pci/controller/dwc-meson: PCI: meson: Add missing remove callback PCI: meson: Propagate devm_add_action_or_reset() failure
This commit is contained in:
commit
c08c02e749
|
|
@ -204,7 +204,9 @@ static inline struct clk *meson_pcie_probe_clock(struct device *dev,
|
|||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
devm_add_action_or_reset(dev, meson_pcie_disable_clock, clk);
|
||||
ret = devm_add_action_or_reset(dev, meson_pcie_disable_clock, clk);
|
||||
if (ret)
|
||||
return ERR_PTR(ret);
|
||||
|
||||
return clk;
|
||||
}
|
||||
|
|
@ -451,6 +453,14 @@ static int meson_pcie_probe(struct platform_device *pdev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void meson_pcie_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct meson_pcie *mp = platform_get_drvdata(pdev);
|
||||
|
||||
dw_pcie_host_deinit(&mp->pci.pp);
|
||||
meson_pcie_power_off(mp);
|
||||
}
|
||||
|
||||
static const struct of_device_id meson_pcie_of_match[] = {
|
||||
{
|
||||
.compatible = "amlogic,axg-pcie",
|
||||
|
|
@ -464,6 +474,7 @@ MODULE_DEVICE_TABLE(of, meson_pcie_of_match);
|
|||
|
||||
static struct platform_driver meson_pcie_driver = {
|
||||
.probe = meson_pcie_probe,
|
||||
.remove = meson_pcie_remove,
|
||||
.driver = {
|
||||
.name = "meson-pcie",
|
||||
.of_match_table = meson_pcie_of_match,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user