diff options
| author | Bjorn Helgaas <bhelgaas@google.com> | 2026-06-23 17:32:07 -0500 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2026-06-23 17:32:07 -0500 |
| commit | c08c02e749b548afe5b772249d1ddab487c20815 (patch) | |
| tree | 0bbc2d3caf5e30a6c8cf29ee1f7bb959f1da38c0 /drivers | |
| parent | 87edaec536414bbc1461fb332f45782bb4d27cfd (diff) | |
| parent | 4b0dc84b293984f75598881809fb2d3daf54a2a8 (diff) | |
| download | ath-c08c02e749b548afe5b772249d1ddab487c20815.tar.gz | |
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
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/pci/controller/dwc/pci-meson.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/pci/controller/dwc/pci-meson.c b/drivers/pci/controller/dwc/pci-meson.c index 0694084f612b7..225d887cd0a3e 100644 --- a/drivers/pci/controller/dwc/pci-meson.c +++ b/drivers/pci/controller/dwc/pci-meson.c @@ -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 @@ err_phy: 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, |
