From 0a19a89fd9ec28434bed1e6b24d56e9b40720323 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Mon, 26 Dec 2011 20:48:48 +0800 Subject: [PATCH] --- yaml --- r: 284023 b: refs/heads/master c: 6ab7e71a9cbcd31f5ee09da384bcfcf0fa11b8c9 h: refs/heads/master i: 284021: 5740d58f0e4d2bf621544977a5fce831097a82d1 284019: 3b604e97202e94187a8fc87adfdfa1e31dffaa4f 284015: 435b744dd9370eda54f94f6596c3d8f7d1c450c7 v: v3 --- [refs] | 2 +- trunk/sound/soc/codecs/88pm860x-codec.c | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 63a5704462f6..aa8422a015a3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6ce91ad4d8d7370be4f9ca3d7ded866cb1e2430d +refs/heads/master: 6ab7e71a9cbcd31f5ee09da384bcfcf0fa11b8c9 diff --git a/trunk/sound/soc/codecs/88pm860x-codec.c b/trunk/sound/soc/codecs/88pm860x-codec.c index 99ca53c01676..9fd3b6827bba 100644 --- a/trunk/sound/soc/codecs/88pm860x-codec.c +++ b/trunk/sound/soc/codecs/88pm860x-codec.c @@ -1430,7 +1430,8 @@ static int __devinit pm860x_codec_probe(struct platform_device *pdev) struct resource *res; int i, ret; - pm860x = kzalloc(sizeof(struct pm860x_priv), GFP_KERNEL); + pm860x = devm_kzalloc(&pdev->dev, sizeof(struct pm860x_priv), + GFP_KERNEL); if (pm860x == NULL) return -ENOMEM; @@ -1459,17 +1460,13 @@ static int __devinit pm860x_codec_probe(struct platform_device *pdev) out: platform_set_drvdata(pdev, NULL); - kfree(pm860x); return -EINVAL; } static int __devexit pm860x_codec_remove(struct platform_device *pdev) { - struct pm860x_priv *pm860x = platform_get_drvdata(pdev); - snd_soc_unregister_codec(&pdev->dev); platform_set_drvdata(pdev, NULL); - kfree(pm860x); return 0; }