summaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2010-11-25 08:08:31 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-11-25 12:08:25 +0100
commit917dac0ff1754776b86967b0ec1750022d9c4265 (patch)
tree47229eb19f1807ed85955131565a2751c47b7232 /sound/soc/fsl
parentASoC: efika-audio-fabric: fix resource leak in efika_fabric_init error path (diff)
downloadlinux-917dac0ff1754776b86967b0ec1750022d9c4265.tar.xz
linux-917dac0ff1754776b86967b0ec1750022d9c4265.zip
ASoC: pcm030-audio-fabric: fix resource leak in pcm030_fabric_init error path
Add missing platform_device_put() if platform_device_add() failed. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/fsl')
-rw-r--r--sound/soc/fsl/pcm030-audio-fabric.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/fsl/pcm030-audio-fabric.c b/sound/soc/fsl/pcm030-audio-fabric.c
index 25f27ec1dd6e..ba4d85e317ed 100644
--- a/sound/soc/fsl/pcm030-audio-fabric.c
+++ b/sound/soc/fsl/pcm030-audio-fabric.c
@@ -76,6 +76,7 @@ static __init int pcm030_fabric_init(void)
rc = platform_device_add(pdev);
if (rc) {
pr_err("pcm030_fabric_init: platform_device_add() failed\n");
+ platform_device_put(pdev);
return -ENODEV;
}
return 0;