]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Mar 2020 06:18:40 +0000 (07:18 +0100)
commit2845377ea9f746c59e7731a6920658241ed125d4
tree403743d60b081fd7088c89ddd1d520f7b69cd78d
parent7d0b4655e567d21b8747aba4d938a3a345294dcf
ASoC: pcm512x: Fix unbalanced regulator enable call in probe error path

commit ac0a68997935c4acb92eaae5ad8982e0bb432d56 upstream.

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: 5a3af1293194d ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/codecs/pcm512x.c