linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH linux-next 1/5] phy: allwinner: phy-sun50i-usb3: Use dev_err_probe()
       [not found] <20250402194203426goMMzm9R9_yQBb7SMNGj1@zte.com.cn>
@ 2025-04-03 17:39 ` Jernej Škrabec
  0 siblings, 0 replies; only message in thread
From: Jernej Škrabec @ 2025-04-03 17:39 UTC (permalink / raw)
  To: vkoul, robert.marko, shao.mingyin
  Cc: kishon, wens, samuel, zhang.enpei, linux-phy, linux-arm-kernel,
	linux-sunxi, linux-kernel, luka.perkov, linux-arm-msm, heiko,
	linux-rockchip, yang.yang29, xu.xin16, ye.xingchen

Dne sreda, 2. april 2025 ob 13:42:03 Srednjeevropski poletni čas je shao.mingyin@zte.com.cn napisal(a):
> From: Zhang Enpei <zhang.enpei@zte.com.cn>
> 
> Replace the open-code with dev_err_probe() to simplify the code.
> 
> Signed-off-by: Zhang Enpei <zhang.enpei@zte.com.cn>
> Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej

> ---
>  drivers/phy/allwinner/phy-sun50i-usb3.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/phy/allwinner/phy-sun50i-usb3.c b/drivers/phy/allwinner/phy-sun50i-usb3.c
> index 363f9a0df503..b03faffc160d 100644
> --- a/drivers/phy/allwinner/phy-sun50i-usb3.c
> +++ b/drivers/phy/allwinner/phy-sun50i-usb3.c
> @@ -141,11 +141,9 @@ 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)) {
> 






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-04-03 17:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20250402194203426goMMzm9R9_yQBb7SMNGj1@zte.com.cn>
2025-04-03 17:39 ` [PATCH linux-next 1/5] phy: allwinner: phy-sun50i-usb3: Use dev_err_probe() Jernej Škrabec

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).