* [PATCH] phy: zynqmp: Simplify code by using dev_err_probe()
@ 2021-02-04 13:11 Michal Simek
2021-02-06 9:58 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Michal Simek @ 2021-02-04 13:11 UTC (permalink / raw)
To: linux-kernel, monstr, michal.simek, git
Cc: Vinod Koul, Anurag Kumar Vulisha, Laurent Pinchart,
linux-arm-kernel, Kishon Vijay Abraham I
Use already prepared dev_err_probe() introduced by commit a787e5400a1c
("driver core: add device probe log helper").
It simplifies EPROBE_DEFER handling.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
drivers/phy/xilinx/phy-zynqmp.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/phy/xilinx/phy-zynqmp.c b/drivers/phy/xilinx/phy-zynqmp.c
index 2b0f921b6ee3..2b65f84a5f89 100644
--- a/drivers/phy/xilinx/phy-zynqmp.c
+++ b/drivers/phy/xilinx/phy-zynqmp.c
@@ -874,13 +874,10 @@ static int xpsgtr_get_ref_clocks(struct xpsgtr_dev *gtr_dev)
snprintf(name, sizeof(name), "ref%u", refclk);
clk = devm_clk_get_optional(gtr_dev->dev, name);
- if (IS_ERR(clk)) {
- if (PTR_ERR(clk) != -EPROBE_DEFER)
- dev_err(gtr_dev->dev,
- "Failed to get reference clock %u: %ld\n",
- refclk, PTR_ERR(clk));
- return PTR_ERR(clk);
- }
+ if (IS_ERR(clk))
+ return dev_err_probe(gtr_dev->dev, PTR_ERR(clk),
+ "Failed to get reference clock %u\n",
+ refclk);
if (!clk)
continue;
--
2.30.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] phy: zynqmp: Simplify code by using dev_err_probe()
2021-02-04 13:11 [PATCH] phy: zynqmp: Simplify code by using dev_err_probe() Michal Simek
@ 2021-02-06 9:58 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2021-02-06 9:58 UTC (permalink / raw)
To: Michal Simek
Cc: monstr, Anurag Kumar Vulisha, linux-kernel,
Kishon Vijay Abraham I, Laurent Pinchart, linux-arm-kernel, git
On 04-02-21, 14:11, Michal Simek wrote:
> Use already prepared dev_err_probe() introduced by commit a787e5400a1c
> ("driver core: add device probe log helper").
> It simplifies EPROBE_DEFER handling.
Applied, thanks
--
~Vinod
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-06 10:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 13:11 [PATCH] phy: zynqmp: Simplify code by using dev_err_probe() Michal Simek
2021-02-06 9:58 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).