From: Richard Fitzgerald Date: Thu, 21 Jan 2016 14:41:12 +0000 (+0000) Subject: ASoC: wm5110: Unregister compressed platform when driver is removed X-Git-Tag: v4.5-rc4~21^2^2^5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f5ede8dcc3ec1fe5344f0d30717931a44e630631;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c index c364096018358..cd1b3080a4974 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);