linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] phy: omap-usb2-phy: Use dev_err_probe()
@ 2023-03-23  7:45 ye.xingchen
  2023-03-23  9:19 ` Uwe Kleine-König
  2023-03-31 13:50 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: ye.xingchen @ 2023-03-23  7:45 UTC (permalink / raw)
  To: vkoul; +Cc: kishon, u.kleine-koenig, linmq006, linux-phy, linux-kernel

From: Ye Xingchen <ye.xingchen@zte.com.cn>

Replace the open-code with dev_err_probe() to simplify the code.

Signed-off-by: Ye Xingchen <ye.xingchen@zte.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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] phy: omap-usb2-phy: Use dev_err_probe()
  2023-03-23  7:45 [PATCH] phy: omap-usb2-phy: Use dev_err_probe() ye.xingchen
@ 2023-03-23  9:19 ` Uwe Kleine-König
  2023-03-31 13:50 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2023-03-23  9:19 UTC (permalink / raw)
  To: ye.xingchen; +Cc: vkoul, kishon, linmq006, linux-phy, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 493 bytes --]

On Thu, Mar 23, 2023 at 03:45:52PM +0800, ye.xingchen@zte.com.cn wrote:
> From: Ye Xingchen <ye.xingchen@zte.com.cn>
> 
> Replace the open-code with dev_err_probe() to simplify the code.
> 
> Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn>

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] phy: omap-usb2-phy: Use dev_err_probe()
  2023-03-23  7:45 [PATCH] phy: omap-usb2-phy: Use dev_err_probe() ye.xingchen
  2023-03-23  9:19 ` Uwe Kleine-König
@ 2023-03-31 13:50 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2023-03-31 13:50 UTC (permalink / raw)
  To: ye.xingchen; +Cc: kishon, u.kleine-koenig, linmq006, linux-phy, linux-kernel

On 23-03-23, 15:45, ye.xingchen@zte.com.cn wrote:
> From: Ye Xingchen <ye.xingchen@zte.com.cn>
> 
> Replace the open-code with dev_err_probe() to simplify the code.

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-31 13:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23  7:45 [PATCH] phy: omap-usb2-phy: Use dev_err_probe() ye.xingchen
2023-03-23  9:19 ` Uwe Kleine-König
2023-03-31 13:50 ` 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).