]> git.ipfire.org Git - thirdparty/linux.git/commit
dmaengine: stm32: dmamux: fix device leak on route allocation
authorJohan Hovold <johan@kernel.org>
Mon, 17 Nov 2025 16:12:52 +0000 (17:12 +0100)
committerVinod Koul <vkoul@kernel.org>
Sun, 14 Dec 2025 09:17:24 +0000 (14:47 +0530)
commitdd6e4943889fb354efa3f700e42739da9bddb6ef
tree99a9c611ca97a107b4726ac9f2664a84e5f9d21b
parent9fb490323997dcb6f749cd2660a17a39854600cd
dmaengine: stm32: dmamux: fix device leak on route allocation

Make sure to drop the reference taken when looking up the DMA mux
platform device during route allocation.

Note that holding a reference to a device does not prevent its driver
data from going away so there is no point in keeping the reference.

Fixes: df7e762db5f6 ("dmaengine: Add STM32 DMAMUX driver")
Cc: stable@vger.kernel.org # 4.15
Cc: Pierre-Yves MORDRET <pierre-yves.mordret@foss.st.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://patch.msgid.link/20251117161258.10679-11-johan@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/stm32/stm32-dmamux.c