lkml.org 
[lkml]   [2011]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3/3] sound: atmel_ssc_dai: fix ssc error path
    Date
    We do not have to free a resource that is not allocated yet.

    Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
    ---
    sound/soc/atmel/atmel_ssc_dai.c | 4 +---
    1 files changed, 1 insertions(+), 3 deletions(-)

    diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
    index 7fbfa05..a7a7bbc 100644
    --- a/sound/soc/atmel/atmel_ssc_dai.c
    +++ b/sound/soc/atmel/atmel_ssc_dai.c
    @@ -838,10 +838,8 @@ int atmel_ssc_set_audio(int ssc_id)
    }

    ssc_pdev = platform_device_alloc("atmel-ssc-dai", ssc_id);
    - if (!ssc_pdev) {
    - ssc_free(ssc);
    + if (!ssc_pdev)
    return -ENOMEM;
    - }

    /* If we can grab the SSC briefly to parent the DAI device off it */
    ssc = ssc_request(ssc_id);
    --
    1.7.3


    \
     
     \ /
      Last update: 2011-05-26 12:39    [W:2.901 / U:0.176 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site