From patchwork Sat Dec 14 05:29:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 301224 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E8CCF2C0084 for ; Sat, 14 Dec 2013 16:29:14 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751078Ab3LNF3N (ORCPT ); Sat, 14 Dec 2013 00:29:13 -0500 Received: from mail-bk0-f43.google.com ([209.85.214.43]:53875 "EHLO mail-bk0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750786Ab3LNF3M (ORCPT ); Sat, 14 Dec 2013 00:29:12 -0500 Received: by mail-bk0-f43.google.com with SMTP id mz12so1673306bkb.30 for ; Fri, 13 Dec 2013 21:29:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=T2fz/aCDbEa7nJWxMipPZEQ0fZDXqEcDdOZ0WCoq3wg=; b=o0l0XzglFbQpuEZ4ToUyMQydCzBr01WVyRuhHHa2+pvrIo3hqo1jang9L06/QV5yZg qZaL/7RBe1cep5ZVQM1LlSHR7RhqG+V+eTaEa9L3P+ojmCt6o+gDxL39S1OzWhrkvNsU CdytuEayHIxtqbJ1okq+whm2k/8X2H+hgt7u1daH3OHpkpyuCNwttRQLKEzCPc+pHI/D CDfpP80cvXwib5Pf48FhWaMQtMpsdQr4ueEkGOAad9P7ltdLRY9PVgv7WJj9xreY1GY/ M4ed/OnhjLQfcng1xZdR8Hv8jYgaqYXjdWOiB+3IssXLoULNBx4c4iaA6uzH8/RNYc9k HsJQ== MIME-Version: 1.0 X-Received: by 10.204.59.67 with SMTP id k3mr1338600bkh.58.1386998951543; Fri, 13 Dec 2013 21:29:11 -0800 (PST) Received: by 10.204.74.130 with HTTP; Fri, 13 Dec 2013 21:29:11 -0800 (PST) Date: Sat, 14 Dec 2013 13:29:11 +0800 Message-ID: Subject: [PATCH -next] ASoC: tegra20-ac97: add missing clk_disable_unprepare() on error path From: Wei Yongjun To: swarren@wwwdotorg.org, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.de, thierry.reding@gmail.com, grant.likely@linaro.org, robh+dt@kernel.org Cc: yongjun_wei@trendmicro.com.cn, alsa-devel@alsa-project.org, linux-tegra@vger.kernel.org Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org From: Wei Yongjun Add the missing clk_disable_unprepare() before return from tegra20_ac97_platform_probe() in the error handling case. Signed-off-by: Wei Yongjun Reviewed-by: Stephen Warren --- sound/soc/tegra/tegra20_ac97.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-tegra" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c index d8b98d7..cf5e1cf 100644 --- a/sound/soc/tegra/tegra20_ac97.c +++ b/sound/soc/tegra/tegra20_ac97.c @@ -393,7 +393,7 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) ret = snd_soc_set_ac97_ops(&tegra20_ac97_ops); if (ret) { dev_err(&pdev->dev, "Failed to set AC'97 ops: %d\n", ret); - goto err_asoc_utils_fini; + goto err_clk_disable_unprepare; } ret = snd_soc_register_component(&pdev->dev, &tegra20_ac97_component, @@ -401,7 +401,7 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) if (ret) { dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); ret = -ENOMEM; - goto err_asoc_utils_fini; + goto err_clk_disable_unprepare; } ret = tegra_pcm_platform_register(&pdev->dev); @@ -417,6 +417,8 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev) err_unregister_component: snd_soc_unregister_component(&pdev->dev); +err_clk_disable_unprepare: + clk_disable_unprepare(ac97->clk_ac97); err_asoc_utils_fini: tegra_asoc_utils_fini(&ac97->util_data); err_clk_put: