From patchwork Tue Apr 15 20:39:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Jaeger X-Patchwork-Id: 3995501 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C6E67BFF02 for ; Tue, 15 Apr 2014 20:40:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0FB5C2025B for ; Tue, 15 Apr 2014 20:40:00 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id BAFA620148 for ; Tue, 15 Apr 2014 20:39:58 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 35F57265233; Tue, 15 Apr 2014 22:39:57 +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.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 2E4E22651B9; Tue, 15 Apr 2014 22:39:46 +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 7E2922651C0; Tue, 15 Apr 2014 22:39:44 +0200 (CEST) Received: from smtprelay02.ispgateway.de (smtprelay02.ispgateway.de [80.67.31.25]) by alsa0.perex.cz (Postfix) with ESMTP id 8CE652651B8 for ; Tue, 15 Apr 2014 22:39:36 +0200 (CEST) Received: from [78.53.95.127] (helo=betelgeuse.mikrowelle.local) by smtprelay02.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1WaA8j-0002fV-Uj; Tue, 15 Apr 2014 22:39:34 +0200 From: Christoph Jaeger To: perex@perex.cz, tiwai@suse.de, lgirdwood@gmail.com, broonie@kernel.org Date: Tue, 15 Apr 2014 22:39:01 +0200 Message-Id: <1397594341-7817-1-git-send-email-christophjaeger@linux.com> X-Mailer: git-send-email 1.9.0 X-Df-Sender: MTg4NDM4Mw== Cc: alsa-devel@alsa-project.org, Christoph Jaeger , linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH] ASoC: core: use PTR_ERR instead of PTR_RET 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 PTR_RET is deprecated. PTR_ERR_OR_ZERO should be used instead. However, we already know that IS_ERR is true, and thus PTR_ERR_OR_ZERO would never yield zero, so we can use PTR_ERR here. Signed-off-by: Christoph Jaeger --- sound/soc/soc-core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 051c006..2dc69845 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -2153,28 +2153,28 @@ static int snd_soc_ac97_parse_pinctl(struct device *dev, p = devm_pinctrl_get(dev); if (IS_ERR(p)) { dev_err(dev, "Failed to get pinctrl\n"); - return PTR_RET(p); + return PTR_ERR(p); } cfg->pctl = p; state = pinctrl_lookup_state(p, "ac97-reset"); if (IS_ERR(state)) { dev_err(dev, "Can't find pinctrl state ac97-reset\n"); - return PTR_RET(state); + return PTR_ERR(state); } cfg->pstate_reset = state; state = pinctrl_lookup_state(p, "ac97-warm-reset"); if (IS_ERR(state)) { dev_err(dev, "Can't find pinctrl state ac97-warm-reset\n"); - return PTR_RET(state); + return PTR_ERR(state); } cfg->pstate_warm_reset = state; state = pinctrl_lookup_state(p, "ac97-running"); if (IS_ERR(state)) { dev_err(dev, "Can't find pinctrl state ac97-running\n"); - return PTR_RET(state); + return PTR_ERR(state); } cfg->pstate_run = state;