Re: [PATCH 04/13] ASoC: ti: davinci-i2s: Replace dev_err with dev_err_probe

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

 



Hi Mark,

On Fri, 15 Mar 2024 14:07:13 +0000
Mark Brown <broonie@xxxxxxxxxx> wrote:

> On Fri, Mar 15, 2024 at 12:27:36PM +0100, Bastien Curutchet wrote:
> 
> > -			dev_err(&pdev->dev, "no mem resource?\n");
> > -			return -ENODEV;
> > +			return dev_err_probe(&pdev->dev, -ENODEV, "no mem resource?\n");
> >  		}  
> 
> dev_err_probe() with a fixed error code doesn't seem to make much sense,
> the whole point is to handle deferral but for a straight lookup like
> this that can't happen.

The error code is uniformly formatted and the error path is more compact.
  https://elixir.bootlin.com/linux/latest/source/drivers/base/core.c#L4963

IMHO, to benefit of these feature, it makes sense to use it even with a fixed
error code.

Best regards,
Hervé

-- 
Hervé Codina, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux