summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorRichard Fitzgerald <rf@opensource.wolfsonmicro.com>2016-01-21 17:41:12 +0300
committerMark Brown <broonie@kernel.org>2016-01-22 19:42:23 +0300
commitf5ede8dcc3ec1fe5344f0d30717931a44e630631 (patch)
treeda5101a6d1e95d7b7103f008d39a780a0c0db743 /sound
parent822ad70a2f5c420da5baa9f4354e6b7813ca6da9 (diff)
downloadlinux-f5ede8dcc3ec1fe5344f0d30717931a44e630631.tar.xz
ASoC: wm5110: Unregister compressed platform when driver is removed
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> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm5110.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index c36409601835..cd1b3080a497 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -2358,6 +2358,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);