From patchwork Sat Jun 20 18:55:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 6651521 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 500D89F39B for ; Sat, 20 Jun 2015 18:56:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 810BC20700 for ; Sat, 20 Jun 2015 18:56:58 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 49992206FB for ; Sat, 20 Jun 2015 18:56:57 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 9BC092612D6; Sat, 20 Jun 2015 20:56:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 1EFB1260824; Sat, 20 Jun 2015 20:56:24 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 95127260867; Sat, 20 Jun 2015 20:56:22 +0200 (CEST) Received: from mail-qc0-f172.google.com (mail-qc0-f172.google.com [209.85.216.172]) by alsa0.perex.cz (Postfix) with ESMTP id 5C850260713 for ; Sat, 20 Jun 2015 20:56:16 +0200 (CEST) Received: by qcji3 with SMTP id i3so570448qcj.1 for ; Sat, 20 Jun 2015 11:56:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ef0/p8TR+kpcNT9DVKTeDbgnLXAzGdF9WUomLzWaHlA=; b=W4GSiZtnACCXRFYCYkP310hpV7k/lF1FZo5Bi0A8VpqSKSGPeGMDdSMbd4bOH1Lk1G KSoILE+z3k0SE+FZTqcAF6RXRNgKhPX6NJGiPUiRChTwpagkO47vdiVASKGvUBo0wXnC YyyIOzYMwJmKDLQVkV3sFqecPGp4uBFFKzmlKXjlmKUgS0y3BxccoGGLnvBZj47GYglv tfE1Aw+0dbZfxqsWlGWn1kCg+J7Shdpw4WMbJm52M24AxII7BwG+hGOK3mrLUvjHzGwK pXmS8DDucIOBU5fNEToayxUXMc4MoxeeHgMWgPXMK32a3QYTXjMwcaYOrXXoVxtue3fW iDcQ== X-Received: by 10.140.94.116 with SMTP id f107mr28449653qge.101.1434826575330; Sat, 20 Jun 2015 11:56:15 -0700 (PDT) Received: from localhost.localdomain ([189.101.187.123]) by mx.google.com with ESMTPSA id x66sm7584066qha.8.2015.06.20.11.56.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 20 Jun 2015 11:56:14 -0700 (PDT) From: Fabio Estevam To: broonie@kernel.org Date: Sat, 20 Jun 2015 15:55:51 -0300 Message-Id: <1434826553-11484-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1434826553-11484-1-git-send-email-festevam@gmail.com> References: <1434826553-11484-1-git-send-email-festevam@gmail.com> Cc: Fabio Estevam , alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH 2/4] ASoC: wm8904: Check for clk_prepare_enable() error X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fabio Estevam clk_prepare_enable() may fail, so we should better check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam --- sound/soc/codecs/wm8904.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index 265a4a5..07dc400 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c @@ -1837,7 +1837,9 @@ static int wm8904_set_bias_level(struct snd_soc_codec *codec, switch (level) { case SND_SOC_BIAS_ON: - clk_prepare_enable(wm8904->mclk); + ret = clk_prepare_enable(wm8904->mclk); + if (ret) + return ret; break; case SND_SOC_BIAS_PREPARE: