diff options
author | Mark Brown <broonie@kernel.org> | 2022-08-15 02:33:32 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-08-15 02:33:32 +0300 |
commit | 4d39265b930fb42eb396c3153a3f4afdee9f5c17 (patch) | |
tree | fa926b75208806d33d55c9d9402e0377ae41d15f /sound/soc/sh | |
parent | 568035b01cfb107af8d2e4bd2fb9aea22cf5b868 (diff) | |
parent | b4b5f29a076e52181f63e45a2ad1bc88593072e3 (diff) | |
download | linux-4d39265b930fb42eb396c3153a3f4afdee9f5c17.tar.xz |
Merge remote-tracking branch 'asoc/for-5.20' into asoc-6.0
Diffstat (limited to 'sound/soc/sh')
-rw-r--r-- | sound/soc/sh/rz-ssi.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/sound/soc/sh/rz-ssi.c b/sound/soc/sh/rz-ssi.c index 0d0594a0e4f6..7ace0c0db5b1 100644 --- a/sound/soc/sh/rz-ssi.c +++ b/sound/soc/sh/rz-ssi.c @@ -1017,32 +1017,36 @@ static int rz_ssi_probe(struct platform_device *pdev) ssi->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL); if (IS_ERR(ssi->rstc)) { - rz_ssi_release_dma_channels(ssi); - return PTR_ERR(ssi->rstc); + ret = PTR_ERR(ssi->rstc); + goto err_reset; } reset_control_deassert(ssi->rstc); pm_runtime_enable(&pdev->dev); ret = pm_runtime_resume_and_get(&pdev->dev); if (ret < 0) { - rz_ssi_release_dma_channels(ssi); - pm_runtime_disable(ssi->dev); - reset_control_assert(ssi->rstc); - return dev_err_probe(ssi->dev, ret, "pm_runtime_resume_and_get failed\n"); + dev_err(&pdev->dev, "pm_runtime_resume_and_get failed\n"); + goto err_pm; } ret = devm_snd_soc_register_component(&pdev->dev, &rz_ssi_soc_component, rz_ssi_soc_dai, ARRAY_SIZE(rz_ssi_soc_dai)); if (ret < 0) { - rz_ssi_release_dma_channels(ssi); - - pm_runtime_put(ssi->dev); - pm_runtime_disable(ssi->dev); - reset_control_assert(ssi->rstc); dev_err(&pdev->dev, "failed to register snd component\n"); + goto err_snd_soc; } + return 0; + +err_snd_soc: + pm_runtime_put(ssi->dev); +err_pm: + pm_runtime_disable(ssi->dev); + reset_control_assert(ssi->rstc); +err_reset: + rz_ssi_release_dma_channels(ssi); + return ret; } |