[PATCH 4.4 16/18] ASoC: imx-spdif: Fix crash on suspend
From: Greg Kroah-Hartman
Date: Mon May 04 2020 - 13:59:21 EST
From: Lars-Peter Clausen <lars@xxxxxxxxxx>
commit 9954859185c6e8359e71121037b627f1e294057d upstream.
When registering a ASoC card the driver data of the parent device is set to
point to the card. This driver data is used in the
snd_soc_suspend()/resume() callbacks.
The imx-spdif driver overwrites the driver data with custom data which
causes snd_soc_suspend() to crash. Since the custom driver is not used
anywhere simply deleting the line which sets the custom driver data fixes
the issue.
Fixes: 43ac946922b3 ("ASoC: imx-spdif: add snd_soc_pm_ops for spdif machine driver")
Tested-by: Fabio Estevam <fabio.estevam@xxxxxxx>
Signed-off-by: Lars-Peter Clausen <lars@xxxxxxxxxx>
Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
sound/soc/fsl/imx-spdif.c | 2 --
1 file changed, 2 deletions(-)
--- a/sound/soc/fsl/imx-spdif.c
+++ b/sound/soc/fsl/imx-spdif.c
@@ -72,8 +72,6 @@ static int imx_spdif_audio_probe(struct
goto end;
}
- platform_set_drvdata(pdev, data);
-
end:
of_node_put(spdif_np);