Hui Wang 1417f59ac0 dmaengine: imx-sdma: Fix a possible memory leak in sdma_transfer_init
If the function sdma_load_context() fails, the sdma_desc will be
freed, but the allocated desc->bd is forgot to be freed.

We already met the sdma_load_context() failure case and the log as
below:
[ 450.699064] imx-sdma 30bd0000.dma-controller: Timeout waiting for CH0 ready
...

In this case, the desc->bd will not be freed without this change.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.kernel.org/r/20221130090800.102035-1-hui.wang@canonical.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2023-01-18 17:44:29 +05:30
..
2022-08-04 18:44:38 -07:00
2022-09-29 12:24:16 +05:30
2022-11-11 12:14:26 +05:30
2022-12-19 08:54:17 -06:00
2022-07-06 10:50:43 +05:30
2022-09-05 12:01:54 +05:30
2021-12-13 13:18:48 +05:30