]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
spi: amlogic: spifc-a4: unregister ECC engine on probe failure and remove() callback
authorFelix Gu <ustc.gu@gmail.com>
Sun, 22 Mar 2026 14:28:45 +0000 (22:28 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 30 Mar 2026 17:53:06 +0000 (18:53 +0100)
commitb0dc7e7c56573e7a52080f25f3179a45f3dd7e6f
tree2f7b4f63cd6f88ad5ce4f1e7e2b403b7c588f5aa
parent534025950c9fe4dfbe476b3938d73a26814047d1
spi: amlogic: spifc-a4: unregister ECC engine on probe failure and remove() callback

aml_sfc_probe() registers the on-host NAND ECC engine, but teardown was
missing from both probe unwind and remove-time cleanup. Add a devm cleanup
action after successful registration so
nand_ecc_unregister_on_host_hw_engine() runs automatically on probe
failures and during device removal.

Fixes: 4670db6f32e9 ("spi: amlogic: add driver for Amlogic SPI Flash Controller")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Link: https://patch.msgid.link/20260322-spifc-a4-v1-1-2dc5ebcbe0a9@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-amlogic-spifc-a4.c