diff options
author | 2023-03-17 09:42:31 +0100 | |
---|---|---|
committer | 2023-03-17 15:47:50 +0000 | |
commit | 9448bc1dee65f86c0fe64d9dea8b410af0586886 (patch) | |
tree | 66031e8a7d1e240a938b746f0ce18bd771b1efe2 /tools/perf/scripts/python/stackcollapse.py | |
parent | spi: atmel-quadspi: Don't leak clk enable count in pm resume (diff) | |
download | wireguard-linux-9448bc1dee65f86c0fe64d9dea8b410af0586886.tar.xz wireguard-linux-9448bc1dee65f86c0fe64d9dea8b410af0586886.zip |
spi: atmel-quadspi: Free resources even if runtime resume failed in .remove()
An early error exit in atmel_qspi_remove() doesn't prevent the device
unbind. So this results in an spi controller with an unbound parent
and unmapped register space (because devm_ioremap_resource() is undone).
So using the remaining spi controller probably results in an oops.
Instead unregister the controller unconditionally and only skip hardware
access and clk disable.
Also add a warning about resume failing and return zero unconditionally.
The latter has the only effect to suppress a less helpful error message by
the spi core.
Fixes: 4a2f83b7f780 ("spi: atmel-quadspi: add runtime pm support")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Link: https://lore.kernel.org/r/20230317084232.142257-3-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions