Commit dc7e44db authored by Johan Hovold's avatar Johan Hovold Committed by Vinod Koul
Browse files

dmaengine: ti: dma-crossbar: fix device leak on dra7x route allocation



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

Note that commit 615a4bfc ("dmaengine: ti: Add missing put_device in
ti_dra7_xbar_route_allocate") fixed the leak in the error paths but the
reference is still leaking on successful allocation.

Fixes: a074ae38 ("dmaengine: Add driver for TI DMA crossbar on DRA7x")
Fixes: 615a4bfc ("dmaengine: ti: Add missing put_device in ti_dra7_xbar_route_allocate")
Cc: stable@vger.kernel.org	# 4.2: 615a4bfc
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20251117161258.10679-14-johan@kernel.org


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 10bf494f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -288,6 +288,8 @@ static void *ti_dra7_xbar_route_allocate(struct of_phandle_args *dma_spec,

	ti_dra7_xbar_write(xbar->iomem, map->xbar_out, map->xbar_in);

	put_device(&pdev->dev);

	return map;
}