lkml.org 
[lkml]   [2011]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH] ASoC: Add missing platform_device_put in raumfeld_audio_init error path
    From
    Date
    Signed-off-by: Axel Lin <axel.lin@gmail.com>
    ---
    sound/soc/pxa/raumfeld.c | 4 +++-
    1 files changed, 3 insertions(+), 1 deletions(-)

    diff --git a/sound/soc/pxa/raumfeld.c b/sound/soc/pxa/raumfeld.c
    index 1a591f1..b899a3b 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;
    --
    1.7.4.1




    \
     
     \ /
      Last update: 2011-09-02 15:49    [W:0.023 / U:29.884 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site