Skip to content

Commit

Permalink
ASoC: Add missing platform_device_put in raumfeld_audio_init error path
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Daniel Mack <zonque@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Axel Lin authored and Mark Brown committed Sep 6, 2011
1 parent 7b4615b commit 4ed0d01
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sound/soc/pxa/raumfeld.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4ed0d01

Please sign in to comment.