Re: [PATCH v3 07/18] phy: ti: phy-j721e-wiz: use dev_err_probe() instead of dev_err()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 15, 2024 at 04:17:52PM +0100, Thomas Richard wrote:
> Use dev_err_probe() instead of dev_err() in wiz_clock_init() to simplify
> the code and standardize the error output.

...

>  		ret = wiz_clock_register(wiz);
>  		if (ret)
> -			dev_err(dev, "Failed to register wiz clocks\n");
> +			dev_err_probe(dev, ret, "Failed to register wiz clocks\n");
>  		return ret;

Maybe

		if (ret)
			return dev_err_probe(dev, ret, "Failed to register wiz clocks\n");

		return 0;

?

...

>  		if (!clk_node) {
> -			dev_err(dev, "Unable to get %s node\n", node_name);
>  			ret = -EINVAL;
> +			dev_err_probe(dev, ret, "Unable to get %s node\n", node_name);
>  			goto err;

			ret = dev_err_probe(..., -EINVAL, ...);

>  		}

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux