diff options
Diffstat (limited to 'drivers/pci/controller/dwc')
-rw-r--r-- | drivers/pci/controller/dwc/pci-imx6.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index ac5f6ae0b254..80f843030e36 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c | |||
@@ -326,13 +326,13 @@ static int imx6_pcie_attach_pd(struct device *dev) | |||
326 | if (IS_ERR(imx6_pcie->pd_pcie_phy)) | 326 | if (IS_ERR(imx6_pcie->pd_pcie_phy)) |
327 | return PTR_ERR(imx6_pcie->pd_pcie_phy); | 327 | return PTR_ERR(imx6_pcie->pd_pcie_phy); |
328 | 328 | ||
329 | device_link_add(dev, imx6_pcie->pd_pcie_phy, | 329 | link = device_link_add(dev, imx6_pcie->pd_pcie_phy, |
330 | DL_FLAG_STATELESS | | 330 | DL_FLAG_STATELESS | |
331 | DL_FLAG_PM_RUNTIME | | 331 | DL_FLAG_PM_RUNTIME | |
332 | DL_FLAG_RPM_ACTIVE); | 332 | DL_FLAG_RPM_ACTIVE); |
333 | if (IS_ERR(link)) { | 333 | if (!link) { |
334 | dev_err(dev, "Failed to add device_link to pcie_phy pd: %ld\n", PTR_ERR(link)); | 334 | dev_err(dev, "Failed to add device_link to pcie_phy pd.\n"); |
335 | return PTR_ERR(link); | 335 | return -EINVAL; |
336 | } | 336 | } |
337 | 337 | ||
338 | return 0; | 338 | return 0; |