]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dmaengine: stm32: dmamux: fix device leak on route allocation
authorJohan Hovold <johan@kernel.org>
Wed, 21 Jan 2026 12:20:38 +0000 (07:20 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Feb 2026 15:44:19 +0000 (16:44 +0100)
commit1dda2a32303df0091896b01a9d09070d61fa344c
treedb8e305f35afc845970f2fe3749f385304ca75c8
parent68688fc4eab007834b4c2d740214423ba2a335a8
dmaengine: stm32: dmamux: fix device leak on route allocation

[ Upstream commit dd6e4943889fb354efa3f700e42739da9bddb6ef ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/stm32-dmamux.c