[alsa-devel] [PATCH] ASoC: core: On resume also check the soc device state
Liam Girdwood
lrg at slimlogic.co.uk
Mon Feb 22 12:32:12 CET 2010
On Mon, 2010-02-22 at 13:27 +0200, Peter Ujfalusi wrote:
> Check the card->codec on soc_resume to detect if the soc
> device is properly initialized.
> If the card->codec is NULL, than do not continue the resume
> operation, since the device is not initialized properly.
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi at nokia.com>
> ---
>
> The soc_susbend code is checking, if the soc device is properly
> initialized, but on soc_resume the check is missing, and it is
> unlikely that the soc device is actually initialized between these
> two calls.
> This fixes a crash, when doing suspend on a system where a soc
> device is not properly initialized.
> The crash happens on resume path, since the suspend has been protected
> against such a scenario.
>
> sound/soc/soc-core.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
Acked-by: Liam Girdwood <lrg at slimlogic.co.uk>
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk
More information about the Alsa-devel
mailing list