Re: [PATCH] ASoC: SOF: imx: Remove the use of dev_err_probe()
From: Laurentiu Mihalcea
Date: Wed Aug 20 2025 - 05:29:19 EST
On 8/20/2025 10:04 AM, Daniel Baluta wrote:
> On Tue, Aug 19, 2025 at 2:29 PM Xichao Zhao <zhao.xichao@xxxxxxxx> wrote:
>> The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
>> Therefore, remove the useless call to dev_err_probe(), and just
>> return the value instead.
>>
>> Signed-off-by: Xichao Zhao <zhao.xichao@xxxxxxxx>
> NACK on this.
>
> Quote from dev_err_probe documentation:
>
> ```
> Using this helper in your probe function is totally fine even if @err
> * is known to never be -EPROBE_DEFER.
> * The benefit compared to a normal dev_err() is the standardized format
> * of the error code, which is emitted symbolically (i.e. you get "EAGAIN"
> * instead of "-35"), and having the error code returned allows more
> * compact error paths.
> ```
AFAIK the kernel logs are verbose enough on OOM errors, which makes prints
such as the ones removed by this series unneeded (have a look at [1]). Normally,
you'd get a warning from checkpatch but I think these logs slipped through the
cracks because the error messages do not quite match the expected format?
[1]: https://lkml.org/lkml/2014/6/10/382