[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <56508eeadf7fa8692877e872871f10294d48c49d.1674584626.git.geert+renesas@glider.be>
Date: Tue, 24 Jan 2023 19:37:26 +0100
From: Geert Uytterhoeven <geert+renesas@...der.be>
To: Vinod Koul <vkoul@...nel.org>, Jonathan Corbet <corbet@....net>,
Madalin Bucur <madalin.bucur@....com>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Horatiu Vultur <horatiu.vultur@...rochip.com>,
UNGLinuxDriver@...rochip.com,
Thierry Reding <thierry.reding@...il.com>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof WilczyĆski <kw@...ux.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Kishon Vijay Abraham I <kishon@...nel.org>,
Alan Stern <stern@...land.harvard.edu>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Alim Akhtar <alim.akhtar@...sung.com>,
Siddharth Vadapalli <s-vadapalli@...com>,
Russell King <linux@...linux.org.uk>
Cc: linux-phy@...ts.infradead.org, linux-doc@...r.kernel.org,
netdev@...r.kernel.org, linux-tegra@...r.kernel.org,
linux-pci@...r.kernel.org, linux-usb@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org,
Geert Uytterhoeven <geert+renesas@...der.be>
Subject: [PATCH v2 7/9] 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: Geert Uytterhoeven <geert+renesas@...der.be>
Acked-by: Bjorn Helgaas <bhelgaas@...gle.com>
---
v2:
- Add Acked-by.
---
drivers/pci/controller/pci-tegra.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
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;
}
--
2.34.1
Powered by blists - more mailing lists