Re: [PATCH] staging: most: dim2: use dev_err_probe() for clock errors in rcar enable functions
From: Dan Carpenter
Date: Tue Jun 23 2026 - 09:17:16 EST
On Tue, Jun 23, 2026 at 03:42:43PM +0300, Batu Ada Tutkun wrote:
> rcar_gen2_enable() and rcar_gen3_enable() use the old pattern of
> dev_err() followed by return PTR_ERR() when devm_clk_get() fails.
> fsl_mx6_enable() in the same file was already converted to use
> dev_err_probe() by a previous cleanup series.
>
> Convert the remaining two functions for consistency. devm_clk_get()
> can return -EPROBE_DEFER, so dev_err_probe() is appropriate here: it
> suppresses the log message at error level when the failure is a deferred
> probe, avoiding misleading output during normal boot.
>
This feels like an AI patch. Please state when you are using AI.
In fsl_mx6_enable(), the original code returned -EFAULT if
devm_clk_get() failed so change it to propagate the error code and
use dev_err_probe() made obvious sense. This was done in
commit b7a013c12504 ("staging: most: dim2: use dev_err_probe and
proper error codes for clock").
In this case, the logic is "monkey see, monkey do" which is
reasonable AI logic but it's not enough motivation on its own
Does devm_clk_get() actually return -EPROBE_DEFER? Does
clk_prepare_enable() return -EPROBE_DEFER? Should that be changed
as well?
> Signed-off-by: Batu Ada Tutkun <batuadatutkun@xxxxxxxxx>
> ---
^^^
You need to say if a patch has been tested or not here under the
--- cut off line.
> drivers/staging/most/dim2/dim2.c | 14 ++++++--------
> 1 file changed, 6 insertions(+), 8 deletions(-)
regards,
dan carpenter