Skip to contentSkip to conversation

ASoC: Add missing platform_device_put in raumfeld_audio_init error path

PATCH Applied Axel Lin 4 participants 5 messages Sep 2, 2011 – Sep 6, 2011

Subsystems (3)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 ASoC: Add missing platform_device_put in raumfeld_audio_init error path

---
 sound/soc/pxa/raumfeld.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
sound/soc/pxa/raumfeld.c +3 -1
index 1a591f1..b899a3b 100644
@@ -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;
Signature · 1 line
1.7.4.1
Acked-by on v1 1/1
#1 lore raw
Quoted 22 lines · Axel Lin
---
 sound/soc/pxa/raumfeld.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
sound/soc/pxa/raumfeld.c +3 -2
index 1a591f1..b899a3b 100644
@@ -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;
--
Quoted 2 lines

1.7.4.1

#4 lore raw
Quoted 1 line · Daniel Mack

Feel free to add my Acked-by as well, if it's not too late.

Done.