[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202303231545522162256@zte.com.cn>
Date: Thu, 23 Mar 2023 15:45:52 +0800 (CST)
From: <ye.xingchen@....com.cn>
To: <vkoul@...nel.org>
Cc: <kishon@...nel.org>, <u.kleine-koenig@...gutronix.de>,
<linmq006@...il.com>, <linux-phy@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH] phy: omap-usb2-phy: 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/ti/phy-omap-usb2.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/phy/ti/phy-omap-usb2.c b/drivers/phy/ti/phy-omap-usb2.c
index bbe5d25b0351..762d3de8b3c5 100644
--- a/drivers/phy/ti/phy-omap-usb2.c
+++ b/drivers/phy/ti/phy-omap-usb2.c
@@ -445,11 +445,9 @@ static int omap_usb2_probe(struct platform_device *pdev)
PTR_ERR(phy->wkupclk));
phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k");
- if (IS_ERR(phy->wkupclk)) {
- if (PTR_ERR(phy->wkupclk) != -EPROBE_DEFER)
- dev_err(&pdev->dev, "unable to get usb_phy_cm_clk32k\n");
- return PTR_ERR(phy->wkupclk);
- }
+ if (IS_ERR(phy->wkupclk))
+ return dev_err_probe(&pdev->dev, PTR_ERR(phy->wkupclk),
+ "unable to get usb_phy_cm_clk32k\n");
dev_warn(&pdev->dev,
"found usb_phy_cm_clk32k, please fix DTS\n");
--
2.25.1
Powered by blists - more mailing lists