]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: Intel: Skylake: Fix DSP core ref count for init failure
authorSubhransu S. Prusty <subhransu.s.prusty@intel.com>
Tue, 22 Aug 2017 11:15:53 +0000 (16:45 +0530)
committerMark Brown <broonie@kernel.org>
Wed, 23 Aug 2017 10:55:18 +0000 (11:55 +0100)
commitabb9db26de555e53a842c18ba3ca4deb7be79958
tree20af735de3da1b85e1d935b307a421d16a942346
parent8ff1c21bbe9bc82a59e5e3d860b158259bf404ab
ASoC: Intel: Skylake: Fix DSP core ref count for init failure

During dsp init failure, the ref count is not incremented and dsp is
powered down. But as the skl driver calls put_core for the init failure it
decrements the dsp core ref count and ref count becomes unbalanced.

This results in dsp core powered up in further runtime suspend/resume
cycles and never powered down.

So increment the ref count before dsp core powerup and for any failure,
decrement in put_core will be balanced.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-sst-dsp.c