From mboxrd@z Thu Jan 1 00:00:00 1970 From: kbuild test robot Subject: [PATCH] ASoC: sun4i-i2s: fix ptr_ret.cocci warnings Date: Mon, 31 Jul 2017 00:43:30 +0800 Message-ID: <20170730164329.GA26670@intel17.lkp.intel.com> References: <201707310016.RARC8ov7%fengguang.wu@intel.com> Reply-To: fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Sender: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Content-Disposition: inline In-Reply-To: <20170729141753.20174-6-codekipper-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Cc: kbuild-all-JC7UmRfGjtg@public.gmane.org, maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org, Marcus Cooper , lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, be17068-p0aYb1w59bq9tCD/VL7h6Q@public.gmane.org, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: alsa-devel@alsa-project.org 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) From mboxrd@z Thu Jan 1 00:00:00 1970 From: lkp@intel.com (kbuild test robot) Date: Mon, 31 Jul 2017 00:43:30 +0800 Subject: [PATCH] ASoC: sun4i-i2s: fix ptr_ret.cocci warnings In-Reply-To: <20170729141753.20174-6-codekipper@gmail.com> References: <201707310016.RARC8ov7%fengguang.wu@intel.com> Message-ID: <20170730164329.GA26670@intel17.lkp.intel.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754286AbdG3QoI (ORCPT ); Sun, 30 Jul 2017 12:44:08 -0400 Received: from mga04.intel.com ([192.55.52.120]:10853 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754239AbdG3QoH (ORCPT ); Sun, 30 Jul 2017 12:44:07 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,437,1496127600"; d="scan'208";a="133757752" Date: Mon, 31 Jul 2017 00:43:30 +0800 From: kbuild test robot To: codekipper@gmail.com Cc: kbuild-all@01.org, maxime.ripard@free-electrons.com, alsa-devel@alsa-project.org, Marcus Cooper , lgirdwood@gmail.com, linux-kernel@vger.kernel.org, be17068@iperbole.bo.it, linux-sunxi@googlegroups.com, broonie@kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] ASoC: sun4i-i2s: fix ptr_ret.cocci warnings Message-ID: <20170730164329.GA26670@intel17.lkp.intel.com> References: <201707310016.RARC8ov7%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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)