[PATCH 1/4] spi: mtk-snfi: unregister ECC engine on probe failure and remove() callback
Mark Brown
broonie at kernel.org
Mon Apr 6 05:53:28 PDT 2026
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.
The latter is a little better, though it's unlikely to make a practical
difference here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20260406/33c49b83/attachment.sig>
More information about the Linux-mediatek
mailing list