Skip to content

Commit dc7e44d

Browse files
jhovoldvinodkoul
authored andcommitted
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 615a4bf ("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: a074ae3 ("dmaengine: Add driver for TI DMA crossbar on DRA7x") Fixes: 615a4bf ("dmaengine: ti: Add missing put_device in ti_dra7_xbar_route_allocate") Cc: stable@vger.kernel.org # 4.2: 615a4bf Cc: Peter Ujfalusi <peter.ujfalusi@ti.com> Cc: Miaoqian Lin <linmq006@gmail.com> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://patch.msgid.link/20251117161258.10679-14-johan@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 10bf494 commit dc7e44d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/dma/ti/dma-crossbar.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ static void *ti_dra7_xbar_route_allocate(struct of_phandle_args *dma_spec,
288288

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

291+
put_device(&pdev->dev);
292+
291293
return map;
292294
}
293295

0 commit comments

Comments
 (0)