dmaengine: ti: edma: fix missed failure handling
authorChuhong Yuan <hslester96@gmail.com>
Mon, 18 Nov 2019 07:38:02 +0000 (15:38 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Jan 2020 09:01:08 +0000 (10:01 +0100)
commitca4c17f2106e2d1296d335d39ecb2e3d8a9ccccf
tree24e96bb7eeaa992e41564af2a80a5ead4e934fd7
parentc1b9854f3e3f9dffc671952a59d652cf9e31afab
dmaengine: ti: edma: fix missed failure handling

[ Upstream commit 340049d453682a9fe8d91fe794dd091730f4bb25 ]

When devm_kcalloc fails, it forgets to call edma_free_slot.
Replace direct return with failure handler to fix it.

Fixes: 1be5336bc7ba ("dmaengine: edma: New device tree binding")
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Link: https://lore.kernel.org/r/20191118073802.28424-1-hslester96@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/ti/edma.c