ASoC: au1x: dbdma2: plug memleak in pcm device creation error path
authorManuel Lauss <[email protected]>
Tue, 1 Dec 2009 17:10:35 +0000 (18:10 +0100)
committerMark Brown <[email protected]>
Thu, 3 Dec 2009 10:49:55 +0000 (10:49 +0000)
free the allocated pcm platform device in the error path.

Signed-off-by: Manuel Lauss <[email protected]>
Acked-by: Liam Girdwood <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
sound/soc/au1x/dbdma2.c

index 2ca33b09a86784b883ef54124fb786d6f2c0546f..19e4d37eba1cf2c253c1e098aa52b8798d3b766a 100644 (file)
@@ -480,6 +480,7 @@ struct platform_device *au1xpsc_pcm_add(struct platform_device *pdev)
        if (!ret)
                return pd;
 
+       platform_device_put(pd);
 out:
        kfree(res);
        return NULL;