ASoC: atmel_ssc_dai: fix ssc error path
authorNicolas Ferre <nicolas.ferre@atmel.com>
Thu, 26 May 2011 11:44:12 +0000 (13:44 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 26 May 2011 14:10:11 +0000 (22:10 +0800)
We do not have to free a resource that is not allocated yet.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/atmel/atmel_ssc_dai.c

index 7fbfa05..a7a7bbc 100644 (file)
@@ -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);