[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202303231542125412125@zte.com.cn>
Date: Thu, 23 Mar 2023 15:42:12 +0800 (CST)
From: <ye.xingchen@....com.cn>
To: <vkoul@...nel.org>
Cc: <kishon@...nel.org>, <wens@...e.org>, <jernej.skrabec@...il.com>,
<samuel@...lland.org>, <linux-phy@...ts.infradead.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-sunxi@...ts.linux.dev>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] phy: allwinner: Use dev_err_probe()
From: Ye Xingchen <ye.xingchen@....com.cn>
Replace the open-code with dev_err_probe() to simplify the code.
Signed-off-by: Ye Xingchen <ye.xingchen@....com.cn>
---
drivers/phy/allwinner/phy-sun50i-usb3.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/phy/allwinner/phy-sun50i-usb3.c b/drivers/phy/allwinner/phy-sun50i-usb3.c
index 84055b720016..c43087b85070 100644
--- a/drivers/phy/allwinner/phy-sun50i-usb3.c
+++ b/drivers/phy/allwinner/phy-sun50i-usb3.c
@@ -140,11 +140,8 @@ static int sun50i_usb3_phy_probe(struct platform_device *pdev)
return -ENOMEM;
phy->clk = devm_clk_get(dev, NULL);
- if (IS_ERR(phy->clk)) {
- if (PTR_ERR(phy->clk) != -EPROBE_DEFER)
- dev_err(dev, "failed to get phy clock\n");
- return PTR_ERR(phy->clk);
- }
+ if (IS_ERR(phy->clk))
+ return dev_err_probe(dev, PTR_ERR(phy->clk), "failed to get phy clock\n");
phy->reset = devm_reset_control_get(dev, NULL);
if (IS_ERR(phy->reset)) {
--
2.25.1
Powered by blists - more mailing lists