aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux
diff options
context:
space:
mode:
authorLukas Wunner <[email protected]>2020-12-07 09:17:08 +0100
committerMark Brown <[email protected]>2020-12-07 14:18:53 +0000
commit0f4ad8d59f33b24dd86739f3be23e6af1a86f5a9 (patch)
treed1ab04cdda7e2feab664c8eef549a359189b4c8d /scripts/gdb/linux
parentcc53711b2191cf3b3210283ae89bf0abb98c70a3 (diff)
spi: spi-mtk-nor: Don't leak SPI master in probe error path
If the call to devm_spi_register_controller() fails on probe of the MediaTek SPI NOR driver, the spi_controller struct is erroneously not freed. Since commit a1daaa991ed1 ("spi: spi-mtk-nor: use dma_alloc_coherent() for bounce buffer"), the same happens if the call to dmam_alloc_coherent() fails. Since commit 3bfd9103c7af ("spi: spi-mtk-nor: Add power management support"), the same happens if the call to mtk_nor_enable_clk() fails. Fix by switching over to the new devm_spi_alloc_master() helper. Fixes: 881d1ee9fe81 ("spi: add support for mediatek spi-nor controller") Signed-off-by: Lukas Wunner <[email protected]> Reviewed-by: Ikjoon Jang <[email protected]> Cc: <[email protected]> # v5.7+: 5e844cc37a5c: spi: Introduce device-managed SPI controller allocation Cc: <[email protected]> # v5.7+ Cc: Chuanhong Guo <[email protected]> Link: https://lore.kernel.org/r/d5b9f0289465394e73dedb8ec51e180a8f1dffc9.1607286887.git.lukas@wunner.de Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'scripts/gdb/linux')
0 files changed, 0 insertions, 0 deletions