From: Axel Lin Date: Fri, 2 Sep 2011 13:47:41 +0000 (+0800) Subject: ASoC: Add missing platform_device_put in raumfeld_audio_init error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4ed0d012c945af332ede1f9853db5184b6c24da1;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ASoC: Add missing platform_device_put in raumfeld_audio_init error path Signed-off-by: Axel Lin Acked-by: Daniel Mack Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- diff --git a/sound/soc/pxa/raumfeld.c b/sound/soc/pxa/raumfeld.c index 1a591f1ebfbd..b899a3bc8f42 100644 --- a/sound/soc/pxa/raumfeld.c +++ b/sound/soc/pxa/raumfeld.c @@ -306,8 +306,10 @@ static int __init raumfeld_audio_init(void) &snd_soc_raumfeld_connector); ret = platform_device_add(raumfeld_audio_device); - if (ret < 0) + if (ret < 0) { + platform_device_put(raumfeld_audio_device); return ret; + } raumfeld_enable_audio(true); return 0;