Skip to content

Commit 97b801b

Browse files
Zhang Qilongbroonie
authored andcommitted
ASoC: pcm512x: Fix PM disable depth imbalance in pcm512x_probe
The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context. We fix it by going to err_pm instead of err_clk. Fixes:f086ba9d5389c ("ASoC: pcm512x: Support mastering BCLK/LRCLK using the PLL") Signed-off-by: Zhang Qilong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent f4f473f commit 97b801b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sound/soc/codecs/pcm512x.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,7 +1634,7 @@ int pcm512x_probe(struct device *dev, struct regmap *regmap)
16341634
if (val > 6) {
16351635
dev_err(dev, "Invalid pll-in\n");
16361636
ret = -EINVAL;
1637-
goto err_clk;
1637+
goto err_pm;
16381638
}
16391639
pcm512x->pll_in = val;
16401640
}
@@ -1643,7 +1643,7 @@ int pcm512x_probe(struct device *dev, struct regmap *regmap)
16431643
if (val > 6) {
16441644
dev_err(dev, "Invalid pll-out\n");
16451645
ret = -EINVAL;
1646-
goto err_clk;
1646+
goto err_pm;
16471647
}
16481648
pcm512x->pll_out = val;
16491649
}
@@ -1652,12 +1652,12 @@ int pcm512x_probe(struct device *dev, struct regmap *regmap)
16521652
dev_err(dev,
16531653
"Error: both pll-in and pll-out, or none\n");
16541654
ret = -EINVAL;
1655-
goto err_clk;
1655+
goto err_pm;
16561656
}
16571657
if (pcm512x->pll_in && pcm512x->pll_in == pcm512x->pll_out) {
16581658
dev_err(dev, "Error: pll-in == pll-out\n");
16591659
ret = -EINVAL;
1660-
goto err_clk;
1660+
goto err_pm;
16611661
}
16621662
}
16631663
#endif

0 commit comments

Comments
 (0)