Skip to content

Commit a6093ad

Browse files
cdleonardbjorn-helgaas
authored andcommitted
PCI: imx: Fix probe failure without power domain
On chips without a separate power domain for PCI (such as 6q/6qp) the imx6_pcie_attach_pd() function incorrectly returns an error. Fix by returning 0 if dev_pm_domain_attach_by_name() does not find anything. Fixes: 3f7ccee ("PCI: imx: Add multi-pd support") Reported-by: Lukas F.Hartmann <lukas@mntmn.com> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
1 parent d2fd6e8 commit a6093ad

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/pci/controller/dwc/pci-imx6.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,9 @@ static int imx6_pcie_attach_pd(struct device *dev)
310310
imx6_pcie->pd_pcie = dev_pm_domain_attach_by_name(dev, "pcie");
311311
if (IS_ERR(imx6_pcie->pd_pcie))
312312
return PTR_ERR(imx6_pcie->pd_pcie);
313+
/* Do nothing when power domain missing */
314+
if (!imx6_pcie->pd_pcie)
315+
return 0;
313316
link = device_link_add(dev, imx6_pcie->pd_pcie,
314317
DL_FLAG_STATELESS |
315318
DL_FLAG_PM_RUNTIME |

0 commit comments

Comments
 (0)