Applied "ASoC: sun8i-codec: fix crash on module removal" to the asoc tree

Message ID
State New
Headers show
  • Applied "ASoC: sun8i-codec: fix crash on module removal" to the asoc tree
Related show

Commit Message

Mark Brown Nov. 9, 2018, 3:58 p.m.
The patch

   ASoC: sun8i-codec: fix crash on module removal

has been applied to the asoc tree at 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.


From 278df5e5527b633f4882f1680ad58b62a7c07bfe Mon Sep 17 00:00:00 2001
From: Vasily Khoruzhick <>

Date: Thu, 8 Nov 2018 20:31:35 -0800
Subject: [PATCH] ASoC: sun8i-codec: fix crash on module removal

drvdata is actually sun8i_codec, not snd_soc_card, so it crashes
when calling snd_soc_card_get_drvdata().

Drop card and scodec vars anyway since we don't need to
disable/unprepare clocks - it's already done by calling

Drop clk_disable_unprepare() calls for the same reason.

Fixes: 36c684936fae7 ("ASoC: Add sun8i digital audio codec")
Signed-off-by: Vasily Khoruzhick <>

Acked-by: Maxime Ripard <>

Signed-off-by: Mark Brown <>

 sound/soc/sunxi/sun8i-codec.c | 6 ------
 1 file changed, 6 deletions(-)


Alsa-devel mailing list


diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index 522a72fde78d..c4196d4e5915 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -605,16 +605,10 @@  static int sun8i_codec_probe(struct platform_device *pdev)
 static int sun8i_codec_remove(struct platform_device *pdev)
-	struct snd_soc_card *card = platform_get_drvdata(pdev);
-	struct sun8i_codec *scodec = snd_soc_card_get_drvdata(card);
 	if (!pm_runtime_status_suspended(&pdev->dev))
-	clk_disable_unprepare(scodec->clk_module);
-	clk_disable_unprepare(scodec->clk_bus);
 	return 0;