[PATCH 1/4] spi: mtk-snfi: unregister ECC engine on probe failure and remove() callback
Pei Xiao
xiaopei01 at kylinos.cn
Tue Apr 7 00:26:22 PDT 2026
在 2026/4/6 20:53, Mark Brown 写道:
> On Sat, Apr 04, 2026 at 11:44:58AM +0800, Pei Xiao wrote:
>
>> + ret = devm_add_action_or_reset(&pdev->dev, mtk_unregister_ecc_engine,
>> + &ms->ecc_eng);
>> + if (ret) {
>> + dev_err(&pdev->dev, ret, "failed to add ECC unregister action\n");
>> + goto release_ecc;
>> + }
>
> This should either be dev_err(), in which case ret is not a format
> string and this is buggy (I'm surprised it compiles without warnings...)
> or it should be dev_err_probe() in which case the arguments are correct.
ok, thanks a lot, from a person make bug.
I will send v2.
Pei.
> The latter is a little better, though it's unlikely to make a practical
> difference here.
More information about the Linux-mediatek
mailing list