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>
This commit is contained in:
Richard Fitzgerald 2016-01-21 14:41:12 +00:00 коммит произвёл Mark Brown
Родитель 822ad70a2f
Коммит f5ede8dcc3
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -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);