ASoC: sh: rz-ssi: Improve error handling in rz_ssi_probe() error path
authorBiju Das <biju.das.jz@bp.renesas.com>
Thu, 28 Jul 2022 09:26:12 +0000 (10:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Sep 2022 08:30:10 +0000 (10:30 +0200)
commit061ffb1e419bd8185e143b69274cc9eba882a154
tree7f439c805aa5880dfa6109793d6fba2e8a85af76
parentd347d66b19729be12000633eac0d2a3d72e5090d
ASoC: sh: rz-ssi: Improve error handling in rz_ssi_probe() error path

[ Upstream commit c75ed9f54ce8d349fee557f2b471a4d637ed2a6b ]

We usually do cleanup in reverse order of init. Currently in case of
error rz_ssi_release_dma_channels() done in the reverse order. This
patch improves error handling in rz_ssi_probe() error path.

While at it, use "goto cleanup" style to reduce code duplication.

Reported-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20220728092612.38858-1-biju.das.jz@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/sh/rz-ssi.c