On Mon, Feb 09, 2026 at 11:36:51AM -0500, Frank Li wrote:
> On Mon, Feb 09, 2026 at 01:14:07PM +0800, Chen Ni wrote:
> > Changes in v2:
> > - Use dev_err() + return ret instead of dev_err_probe()
>
> why?
>
> Frank
Hi Frank,
The replacement of dev_err_probe() with dev_err() + return ret is based
on two key reasons:
1. Consistency with existing code style in imx_rproc_mmio_detect_mode():
The upper-level probe function already uses dev_err_probe() to handle
errors from this function, and all other error paths here also use
"dev_err() + return ret", so this change aligns with the existing
coding style.
2. Technical rationale from community feedback:
regmap_attach_dev() only returns -ENOMEM errors, and dev_err_probe() is
silent for -ENOMEM errors [1]. Using dev_err() ensures the error is
logged clearly, while returning the original ret maintains proper error
propagation.
[1] 2f3cfd2f4b7c ("driver core: Make dev_err_probe() silent for -ENOMEM")
Best regards,
Chen Ni