Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: au1x: dbdma2: fix oops on soc device removal.

platform_device_unregister() frees resources for us, no need to
do it explicitly. Fixes an oops when machine code removes the
soc-audio device.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

authored by

Manuel Lauss and committed by
Mark Brown
1bc80798 a649d1fc

+1 -4
+1 -4
sound/soc/au1x/dbdma2.c
··· 488 489 void au1xpsc_pcm_destroy(struct platform_device *dmapd) 490 { 491 - if (dmapd) { 492 - kfree(dmapd->resource); 493 - dmapd->resource = NULL; 494 platform_device_unregister(dmapd); 495 - } 496 } 497 EXPORT_SYMBOL_GPL(au1xpsc_pcm_destroy); 498
··· 488 489 void au1xpsc_pcm_destroy(struct platform_device *dmapd) 490 { 491 + if (dmapd) 492 platform_device_unregister(dmapd); 493 } 494 EXPORT_SYMBOL_GPL(au1xpsc_pcm_destroy); 495