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>
This commit is contained in:
bui duc phuc 2026-07-23 18:10:11 +07:00 committed by Mark Brown
parent 7859b74c0b
commit 65ebc8347a
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -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)