mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 18:43:33 +02:00
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 commit615a4bfc42("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:a074ae38f8("dmaengine: Add driver for TI DMA crossbar on DRA7x") Fixes:615a4bfc42("dmaengine: ti: Add missing put_device in ti_dra7_xbar_route_allocate") Cc: stable@vger.kernel.org # 4.2:615a4bfc42Cc: 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>
This commit is contained in:
parent
10bf494fd7
commit
dc7e44db01
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user