[PATCH 2/3] phy: tegra: xusb: Use dev_err_probe()

Jon Hunter jonathanh at nvidia.com
Tue Sep 22 23:36:54 PDT 2026


On 21/09/2026 13:14, Jon Hunter wrote:
> Use the function dev_err_probe() instead of open coding the same logic.
> 
> Signed-off-by: Jon Hunter <jonathanh at nvidia.com>
> ---
>   drivers/phy/tegra/xusb.c | 9 ++-------
>   1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
> index d0d0b252a205..f16c81520a60 100644
> --- a/drivers/phy/tegra/xusb.c
> +++ b/drivers/phy/tegra/xusb.c
> @@ -1257,13 +1257,8 @@ static int tegra_xusb_padctl_probe(struct platform_device *pdev)
>   
>   	err = tegra_xusb_setup_ports(padctl);
>   	if (err) {
> -		const char *level = KERN_ERR;
> -
> -		if (err == -EPROBE_DEFER)
> -			level = KERN_DEBUG;
> -
> -		dev_printk(level, &pdev->dev,
> -			   dev_fmt("failed to setup XUSB ports: %d\n"), err);
> +		dev_err_probe(&pdev->dev, err, "failed to setup XUSB ports\n",
> +			      err);


Looks like I left this extra unneeded 'err' argument. I will fix this in
the next version.

Jon

-- 
nvpublic




More information about the linux-phy mailing list