diff options
| author | bui duc phuc <phucduc.bui@gmail.com> | 2026-07-23 18:10:13 +0700 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-07-30 15:14:34 +0100 |
| commit | de621dacea09c2417b3a6995c61ecdfba72fd485 (patch) | |
| tree | 061a34aad1066e9ba3ab8f29f4782e2e83141c21 | |
| parent | db233669245d967c76efb8a6e59a4f19903ca35b (diff) | |
| download | linux-next-de621dacea09c2417b3a6995c61ecdfba72fd485.tar.gz linux-next-de621dacea09c2417b3a6995c61ecdfba72fd485.zip | |
ASoC: starfive: jh7110_tdm: Remove unnecessary goto
The error path after jh7110_tdm_runtime_resume() failure only performs a
single cleanup operation before returning. Remove the unnecessary goto
and return directly after calling pm_runtime_disable(), simplifying the
control flow without changing the behavior.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260723111014.54071-4-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | sound/soc/starfive/jh7110_tdm.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sound/soc/starfive/jh7110_tdm.c b/sound/soc/starfive/jh7110_tdm.c index afdcde7df91a..5365ebe44471 100644 --- a/sound/soc/starfive/jh7110_tdm.c +++ b/sound/soc/starfive/jh7110_tdm.c @@ -615,16 +615,13 @@ static int jh7110_tdm_probe(struct platform_device *pdev) pm_runtime_enable(&pdev->dev); if (!pm_runtime_enabled(&pdev->dev)) { ret = jh7110_tdm_runtime_resume(&pdev->dev); - if (ret) - goto err_pm_disable; + if (ret) { + pm_runtime_disable(&pdev->dev); + return ret; + } } return 0; - -err_pm_disable: - pm_runtime_disable(&pdev->dev); - - return ret; } static void jh7110_tdm_dev_remove(struct platform_device *pdev) |
