MLK-20308 sound:asoc: fix re-enablement bug
authorCosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Tue, 13 Nov 2018 12:34:36 +0000 (14:34 +0200)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
commit01afb3998739e34061c4512173e125d98a8778cd
tree8cbd884ff5fe4a81dd1c646f5f7bf089aca710eb
parenta1fa8af01c92c9d6dd890646c667baee53e89458
MLK-20308 sound:asoc: fix re-enablement bug

When hwvad is enabled, if you try to re-enable it again, it should fail.
However, we were also double setting state to OFF on fail, which is
wrong because it resets the state and allows the second retry to enable
even if it wasn't disabled before.
Now we only return EBUSY.

Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
(cherry picked from commit 1ef8c4696c0b0c1e4a0f384dd7300d4dab293f3b)
sound/soc/fsl/fsl_micfil.c