Message ID | 56508eeadf7fa8692877e872871f10294d48c49d.1674584626.git.geert+renesas@glider.be (mailing list archive) |
---|---|
State | Handled Elsewhere |
Delegated to: | Lorenzo Pieralisi |
Headers | show |
Series | phy: Add devm_of_phy_optional_get() helper | expand |
diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c index 929f9363e94bec71..5b8907c663e516ad 100644 --- a/drivers/pci/controller/pci-tegra.c +++ b/drivers/pci/controller/pci-tegra.c @@ -1330,12 +1330,9 @@ static struct phy *devm_of_phy_optional_get_index(struct device *dev, if (!name) return ERR_PTR(-ENOMEM); - phy = devm_of_phy_get(dev, np, name); + phy = devm_of_phy_optional_get(dev, np, name); kfree(name); - if (PTR_ERR(phy) == -ENODEV) - phy = NULL; - return phy; }