dmaengine: sh: rz-dmac: Improve cleanup order in probe()/remove()
authorBiju Das <biju.das.jz@bp.renesas.com>
Thu, 6 Jul 2023 11:21:49 +0000 (12:21 +0100)
committerVinod Koul <vkoul@kernel.org>
Wed, 12 Jul 2023 16:54:00 +0000 (22:24 +0530)
commit7ab04b7cffa5aa646bfaf70d63634767dbf87eba
tree463ab33eaee157bb4bf35e2265a66052c9598ef7
parent06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5
dmaengine: sh: rz-dmac: Improve cleanup order in probe()/remove()

We usually do cleanup in reverse order of init. Currently, in the
case of error, this is not followed in rz_dmac_probe(), and similar
case for remove().

This patch improves error handling in probe() and cleanup in
reverse order of init in the remove().

Reported-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Pavel Machek <pavel@denx.de>
Link: https://lore.kernel.org/r/20230706112150.198941-2-biju.das.jz@bp.renesas.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/sh/rz-dmac.c