linux/drivers/dma/ti
Christophe JAILLET 018af9be3d dmaengine: ti: k3-udma-glue: Fix an error handling path in 'k3_udma_glue_cfg_rx_flow()'
All but one error handling paths in the 'k3_udma_glue_cfg_rx_flow()'
function 'goto err' and call 'k3_udma_glue_release_rx_flow()'.

This not correct because this function has a 'channel->flows_ready--;' at
the end, but 'flows_ready' has not been incremented here, when we branch to
the error handling path.

In order to keep a correct value in 'flows_ready', un-roll
'k3_udma_glue_release_rx_flow()', simplify it, add some labels and branch
at the correct places when an error is detected.

Doing so, we also NULLify 'flow->udma_rflow' in a path that was lacking it.

Fixes: d702419134 ("dmaengine: ti: k3-udma: Add glue layer for non DMAengine user")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20200318191209.1267-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2020-03-23 11:48:34 +05:30
..
Kconfig dmaengine: ti: k3-udma: Add glue layer for non DMAengine users 2020-01-21 11:06:12 +05:30
Makefile dmaengine: ti: k3-udma: Add glue layer for non DMAengine users 2020-01-21 11:06:12 +05:30
cppi41.c dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle 2019-10-23 21:15:21 +05:30
dma-crossbar.c dmaengine: ti: dma-crossbar: Fix a memory leak bug 2019-08-20 17:16:15 +05:30
edma.c dmaengine: ti: edma: Fix error return code in edma_probe() 2019-12-18 11:39:34 +05:30
k3-psil-am654.c dmaengine: ti: k3-psil: make symbols static 2020-01-21 13:10:24 +05:30
k3-psil-j721e.c dmaengine: ti: k3-psil: make symbols static 2020-01-21 13:10:24 +05:30
k3-psil-priv.h dmaengine: ti: k3-psil: make symbols static 2020-01-21 13:10:24 +05:30
k3-psil.c dmaengine: ti: k3-psil: make symbols static 2020-01-21 13:10:24 +05:30
k3-udma-glue.c dmaengine: ti: k3-udma-glue: Fix an error handling path in 'k3_udma_glue_cfg_rx_flow()' 2020-03-23 11:48:34 +05:30
k3-udma-private.c dmaengine: ti: k3-udma: Add glue layer for non DMAengine users 2020-01-21 11:06:12 +05:30
k3-udma.c dmaengine: ti: k3-udma: Fix terminated transfer handling 2020-02-19 13:09:11 +05:30
k3-udma.h dmaengine: ti: k3-udma: Add glue layer for non DMAengine users 2020-01-21 11:06:12 +05:30
omap-dma.c dmaengine: ti: omap-dma: don't allow a null od->plat pointer to be dereferenced 2020-01-13 09:36:45 -08:00