]> git.ipfire.org Git - thirdparty/linux.git/commit
spi: stm32-ospi: Fix resource leak in remove() callback
authorFelix Gu <ustc.gu@gmail.com>
Sun, 29 Mar 2026 11:14:05 +0000 (19:14 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 30 Mar 2026 12:22:18 +0000 (13:22 +0100)
commit73cd1f97946ae3796544448ff12c07f399bb2881
tree41c17b7d40cc42cc339fbd4d5468205860fbd5c4
parent7aaa8047eafd0bd628065b15757d9b48c5f9c07d
spi: stm32-ospi: Fix resource leak in remove() callback

The remove() callback returned early if pm_runtime_resume_and_get()
failed, skipping the cleanup of spi controller and other resources.

Remove the early return so cleanup completes regardless of PM resume
result.

Fixes: 79b8a705e26c ("spi: stm32: Add OSPI driver")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Link: https://patch.msgid.link/20260329-ospi-v1-1-cc8cf1c82c4a@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-stm32-ospi.c