From: Axel Lin Date: Thu, 25 Nov 2010 07:07:25 +0000 (+0800) Subject: ASoC: efika-audio-fabric: fix resource leak in efika_fabric_init error path X-Git-Tag: 2.1b_release~5980^2~11^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e1f86509732ccc39938974db0612d14afbca953;p=platform%2Fkernel%2Fkernel-mfld-blackbay.git ASoC: efika-audio-fabric: fix resource leak in efika_fabric_init error path Add missing platform_device_put() if platform_device_add() failed. Signed-off-by: Axel Lin Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- diff --git a/sound/soc/fsl/efika-audio-fabric.c b/sound/soc/fsl/efika-audio-fabric.c index 53251e6..108b5d8 100644 --- a/sound/soc/fsl/efika-audio-fabric.c +++ b/sound/soc/fsl/efika-audio-fabric.c @@ -76,6 +76,7 @@ static __init int efika_fabric_init(void) rc = platform_device_add(pdev); if (rc) { pr_err("efika_fabric_init: platform_device_add() failed\n"); + platform_device_put(pdev); return -ENODEV; } return 0;