From patchwork Sun Jul 30 16:43:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kernel test robot X-Patchwork-Id: 9870599 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9B0B3603B4 for ; Sun, 30 Jul 2017 16:45:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8C3162859F for ; Sun, 30 Jul 2017 16:45:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8ACF1285A2; Sun, 30 Jul 2017 16:45:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C83BD285B7 for ; Sun, 30 Jul 2017 16:45:16 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 76653266F0A; Sun, 30 Jul 2017 18:44: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 19339266F04; Sun, 30 Jul 2017 18:44:23 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by alsa0.perex.cz (Postfix) with ESMTP id 4D958266EE4 for ; Sun, 30 Jul 2017 18:44:10 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jul 2017 09:44:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,437,1496127600"; d="scan'208";a="133757752" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by fmsmga006.fm.intel.com with ESMTP; 30 Jul 2017 09:43:51 -0700 Received: from kbuild by bee with local (Exim 4.84_2) (envelope-from ) id 1dbrO3-0008wq-F6; Mon, 31 Jul 2017 00:48:15 +0800 Date: Mon, 31 Jul 2017 00:43:30 +0800 From: kbuild test robot To: codekipper@gmail.com Message-ID: <20170730164329.GA26670@intel17.lkp.intel.com> References: <201707310016.RARC8ov7%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170729141753.20174-6-codekipper@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Cc: alsa-devel@alsa-project.org, be17068@iperbole.bo.it, linux-kernel@vger.kernel.org, lgirdwood@gmail.com, Marcus Cooper , linux-sunxi@googlegroups.com, broonie@kernel.org, kbuild-all@01.org, maxime.ripard@free-electrons.com, linux-arm-kernel@lists.infradead.org Subject: [alsa-devel] [PATCH] ASoC: sun4i-i2s: fix ptr_ret.cocci warnings 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 sound/soc/sunxi/sun4i-i2s.c:740:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Fixes: 298207690de9 ("ASoC: sun4i-i2s: Add regmap fields for channels") CC: Marcus Cooper Signed-off-by: Fengguang Wu --- sun4i-i2s.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/sound/soc/sunxi/sun4i-i2s.c +++ b/sound/soc/sunxi/sun4i-i2s.c @@ -737,10 +737,7 @@ static int sun4i_i2s_init_regmap_fields( i2s->field_rxchansel = devm_regmap_field_alloc(dev, i2s->regmap, i2s->variant->field_rxchansel); - if (IS_ERR(i2s->field_rxchansel)) - return PTR_ERR(i2s->field_rxchansel); - - return 0; + return PTR_ERR_OR_ZERO(i2s->field_rxchansel); } static int sun4i_i2s_probe(struct platform_device *pdev)