OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e43fdb
)
phy: zynqmp: Simplify code by using dev_err_probe()
author
Michal Simek
<michal.simek@xilinx.com>
Thu, 4 Feb 2021 13:11:42 +0000
(14:11 +0100)
committer
Vinod Koul
<vkoul@kernel.org>
Sat, 6 Feb 2021 09:58:15 +0000
(15:28 +0530)
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>
Link:
https://lore.kernel.org/r/0df30548f721b10475a6cc5659beda102fec3c87.1612444300.git.michal.simek@xilinx.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/xilinx/phy-zynqmp.c
patch
|
blob
|
history
diff --git
a/drivers/phy/xilinx/phy-zynqmp.c
b/drivers/phy/xilinx/phy-zynqmp.c
index
2b0f921
..
2b65f84
100644
(file)
--- 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;