Commit 3dbbc8e9 authored by Michal Simek's avatar Michal Simek Committed by Vinod Koul

phy: zynqmp: Simplify code by using dev_err_probe()

Use already prepared dev_err_probe() introduced by commit a787e540
("driver core: add device probe log helper").
It simplifies EPROBE_DEFER handling.
Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/0df30548f721b10475a6cc5659beda102fec3c87.1612444300.git.michal.simek@xilinx.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 0e43fdb9
......@@ -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;
......
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