Skip to content

Commit

Permalink
ASoC: au1x: dbdma2: fix oops on soc device removal.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Liam Girdwood <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
Manuel Lauss authored and broonie committed Dec 3, 2009
1 parent a649d1f commit 1bc8079
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions sound/soc/au1x/dbdma2.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,11 +488,8 @@ EXPORT_SYMBOL_GPL(au1xpsc_pcm_add);

void au1xpsc_pcm_destroy(struct platform_device *dmapd)
{
if (dmapd) {
kfree(dmapd->resource);
dmapd->resource = NULL;
if (dmapd)
platform_device_unregister(dmapd);
}
}
EXPORT_SYMBOL_GPL(au1xpsc_pcm_destroy);

Expand Down

0 comments on commit 1bc8079

Please sign in to comment.