]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: pcm512x: Fix unbalanced regulator enable call in probe error path
authorMatthias Reichl <hias@horus.com>
Thu, 20 Feb 2020 20:29:56 +0000 (21:29 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 20 Feb 2020 22:06:12 +0000 (22:06 +0000)
commit3fb05c34c133e05246467d8a839cd2073cf52146
tree3e9c41b2484e2df836dca3473d1b0d37886f613f
parent4e8ea2a6c12b85165e03729b582dbd5a1d8acfe7
ASoC: pcm512x: Fix unbalanced regulator enable call in probe error path

When we get a clock error during probe we have to call
regulator_bulk_disable before bailing out, otherwise we trigger
a warning in regulator_put.

Fix this by using "goto err" like in the error cases above.

Fixes: ceaa4937601b2 ("ASoC: pcm512x: Add PCM512x driver")
Signed-off-by: Matthias Reichl <hias@horus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200220202956.29233-1-hias@horus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/pcm512x.c