summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbui duc phuc <phucduc.bui@gmail.com>2026-07-23 18:10:11 +0700
committerMark Brown <broonie@kernel.org>2026-07-30 15:14:31 +0100
commit65ebc8347a9cfdbf6133adfb018c7243ce5d30f6 (patch)
treef9d95e98c349b924495a527bc24bfbe22f650724
parent7859b74c0bd600cddd86afd55a3dde285a8c2937 (diff)
downloadlinux-next-65ebc8347a9cfdbf6133adfb018c7243ce5d30f6.tar.gz
linux-next-65ebc8347a9cfdbf6133adfb018c7243ce5d30f6.zip
ASoC: starfive: jh7110-pwmdac: Remove unnecessary goto
The error path after jh7110_pwmdac_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-2-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/starfive/jh7110_pwmdac.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sound/soc/starfive/jh7110_pwmdac.c b/sound/soc/starfive/jh7110_pwmdac.c
index a603dd17931c..562936981cf0 100644
--- a/sound/soc/starfive/jh7110_pwmdac.c
+++ b/sound/soc/starfive/jh7110_pwmdac.c
@@ -486,16 +486,13 @@ static int jh7110_pwmdac_probe(struct platform_device *pdev)
pm_runtime_enable(dev->dev);
if (!pm_runtime_enabled(&pdev->dev)) {
ret = jh7110_pwmdac_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_pwmdac_remove(struct platform_device *pdev)