Commit a80becc5 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Vinod Koul

PCI: tegra: Convert to devm_of_phy_optional_get()

Use the new devm_of_phy_optional_get() helper instead of open-coding the
same operation.
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Acked-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/56508eeadf7fa8692877e872871f10294d48c49d.1674584626.git.geert+renesas@glider.beSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 9da87c6e
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment