ASoC: Add missing platform_device_put in raumfeld_audio_init error path
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>
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user