]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: of-dma: Fix of_dma_router_xlate's of_dma_xlate handling
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Thu, 6 Aug 2020 10:49:28 +0000 (13:49 +0300)
committerVinod Koul <vkoul@kernel.org>
Mon, 17 Aug 2020 05:44:28 +0000 (11:14 +0530)
commit1c4c19794651fc2c06580a04f793c71e79c7504d
tree84e463cedbd65f2226879f4209b8e7f0349ab510
parent5e5ce1985a32addb7f0a25730cafc3eb6e096558
dmaengine: of-dma: Fix of_dma_router_xlate's of_dma_xlate handling

of_dma_xlate callback can return ERR_PTR as well NULL in case of failure.

If error code is returned (not NULL) then the route should be released and
the router should not be registered for the channel.

Fixes: 54017cd102d09 ("dmaengine: of_dma: Support for DMA routers")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20200806104928.25975-1-peter.ujfalusi@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/of-dma.c