Skip to content
Verified Commit 40369bfe authored by Han Xu's avatar Han Xu Committed by Mark Brown
Browse files

spi: fsl-qspi: use devm function instead of driver remove



Driver use devm APIs to manage clk/irq/resources and register the spi
controller, but the legacy remove function will be called first during
device detach and trigger kernel panic. Drop the remove function and use
devm_add_action_or_reset() for driver cleanup to ensure the release
sequence.

Trigger kernel panic on i.MX8MQ by
echo 30bb0000.spi >/sys/bus/platform/drivers/fsl-quadspi/unbind

Cc: stable@vger.kernel.org
Fixes: 8fcb830a ("spi: spi-fsl-qspi: use devm_spi_register_controller")
Reported-by: default avatarKevin Hao <haokexin@gmail.com>
Signed-off-by: default avatarHan Xu <han.xu@nxp.com>
Reviewed-by: default avatarFrank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20250326224152.2147099-1-han.xu@nxp.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent d32c4e58
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment