Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1314234 > unrolled thread

[PATCH] ASoC: wm5110: Unregister compressed platform when driver is removed

Started byRichard Fitzgerald <rf@opensource.wolfsonmicro.com>
First post2016-01-21 15:50 +0100
Last post2016-01-21 15:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] ASoC: wm5110: Unregister compressed platform when driver is removed Richard Fitzgerald <rf@opensource.wolfsonmicro.com> - 2016-01-21 15:50 +0100

#1314234 — [PATCH] ASoC: wm5110: Unregister compressed platform when driver is removed

FromRichard Fitzgerald <rf@opensource.wolfsonmicro.com>
Date2016-01-21 15:50 +0100
Subject[PATCH] ASoC: wm5110: Unregister compressed platform when driver is removed
Message-ID<qToIG-6z7-33@gated-at.bofh.it>
The driver was not unregistering the compressed platform in
wm5110_remove(). If the codec is built as a module, this would
lead to a NULL pointer deref if the module was unloaded and then
re-probed.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/wm5110.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index 6088d30..97c0f1e 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -2382,6 +2382,7 @@ error:
 
 static int wm5110_remove(struct platform_device *pdev)
 {
+	snd_soc_unregister_platform(&pdev->dev);
 	snd_soc_unregister_codec(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
 
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web