]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dmaengine: at_hdmac: fix device leak on of_dma_xlate()
authorJohan Hovold <johan@kernel.org>
Mon, 17 Nov 2025 16:12:43 +0000 (17:12 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Jan 2026 10:18:48 +0000 (11:18 +0100)
commit6a86cf2c09e149d5718a5b7090545f7566da9334
tree927a838ab04e1aafdd5817b1dd3f408d0a1be1a1
parentaca18ac3332b0dcb6cbfc1e10886e323d29d21e3
dmaengine: at_hdmac: fix device leak on of_dma_xlate()

commit b9074b2d7a230b6e28caa23165e9d8bc0677d333 upstream.

Make sure to drop the reference taken when looking up the DMA platform
device during of_dma_xlate() when releasing channel resources.

Note that commit 3832b78b3ec2 ("dmaengine: at_hdmac: add missing
put_device() call in at_dma_xlate()") fixed the leak in a couple of
error paths but the reference is still leaking on successful allocation.

Fixes: bbe89c8e3d59 ("at_hdmac: move to generic DMA binding")
Fixes: 3832b78b3ec2 ("dmaengine: at_hdmac: add missing put_device() call in at_dma_xlate()")
Cc: stable@vger.kernel.org # 3.10: 3832b78b3ec2
Cc: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20251117161258.10679-2-johan@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/at_hdmac.c