From patchwork Wed May 20 07:40:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 6442771 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 8EC0B9F38D for ; Wed, 20 May 2015 07:41:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BEFBE203E5 for ; Wed, 20 May 2015 07:41:15 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 86F18203DA for ; Wed, 20 May 2015 07:41:14 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id E262126154C; Wed, 20 May 2015 09:41:12 +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,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id D063326147E; Wed, 20 May 2015 09:41:04 +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 51E5C2614A0; Wed, 20 May 2015 09:41:03 +0200 (CEST) Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) by alsa0.perex.cz (Postfix) with ESMTP id 92DF426145E for ; Wed, 20 May 2015 09:40:55 +0200 (CEST) Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t4K7enND018848 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 20 May 2015 07:40:50 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t4K7elc2022345 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 20 May 2015 07:40:47 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t4K7eluA018919; Wed, 20 May 2015 07:40:47 GMT Received: from mwanda (/154.0.139.178) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 20 May 2015 00:40:46 -0700 Date: Wed, 20 May 2015 10:40:35 +0300 From: Dan Carpenter To: Liam Girdwood , Sergej Sawazki Message-ID: <20150520074035.GB18278@mwanda> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Source-IP: aserv0022.oracle.com [141.146.126.234] Cc: alsa-devel@alsa-project.org, Lars-Peter Clausen , Takashi Iwai , patches@opensource.wolfsonmicro.com, kernel-janitors@vger.kernel.org, Mark Brown , Charles Keepax Subject: [alsa-devel] [patch] ASoC: wm8741: check for error returns from wm8741_set_pdata() 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Static checkers complain that "ret" is always zero so the conditions are never true. The intention here was clearly to check for errors from wm8741_set_pdata(). Although, since wm8741_set_pdata() never returns errors, it doesn't affect runtime. Fixes: c354b54cfdf6 ('ASoC: wm8741: Add differential mono mode support') Signed-off-by: Dan Carpenter Acked-by: Charles Keepax diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c index c065ea1..09ff01f 100644 --- a/sound/soc/codecs/wm8741.c +++ b/sound/soc/codecs/wm8741.c @@ -613,7 +613,7 @@ static int wm8741_i2c_probe(struct i2c_client *i2c, return ret; } - wm8741_set_pdata(&i2c->dev, wm8741); + ret = wm8741_set_pdata(&i2c->dev, wm8741); if (ret != 0) { dev_err(&i2c->dev, "Failed to set pdata: %d\n", ret); return ret; @@ -679,7 +679,7 @@ static int wm8741_spi_probe(struct spi_device *spi) return ret; } - wm8741_set_pdata(&spi->dev, wm8741); + ret = wm8741_set_pdata(&spi->dev, wm8741); if (ret != 0) { dev_err(&spi->dev, "Failed to set pdata: %d\n", ret); return ret;