From patchwork Wed Mar 9 00:15:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kernel test robot X-Patchwork-Id: 8538541 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D4B72C0553 for ; Wed, 9 Mar 2016 00:16:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 18541201FE for ; Wed, 9 Mar 2016 00:16:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BA5EF20204 for ; Wed, 9 Mar 2016 00:16:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751238AbcCIAQz (ORCPT ); Tue, 8 Mar 2016 19:16:55 -0500 Received: from mga09.intel.com ([134.134.136.24]:59079 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750888AbcCIAQy (ORCPT ); Tue, 8 Mar 2016 19:16:54 -0500 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 08 Mar 2016 16:16:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,558,1449561600"; d="scan'208";a="760592838" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by orsmga003.jf.intel.com with ESMTP; 08 Mar 2016 16:16:50 -0800 Received: from kbuild by bee with local (Exim 4.83) (envelope-from ) id 1adRo1-000L0M-DS; Wed, 09 Mar 2016 08:16:49 +0800 Date: Wed, 9 Mar 2016 08:15:55 +0800 From: kbuild test robot To: Jyri Sarha Cc: kbuild-all@01.org, dri-devel@lists.freedesktop.org, airlied@linux.ie, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, bcousson@baylibre.com, alsa-devel@alsa-project.org, tony@atomide.com, broonie@kernel.org, liam.r.girdwood@linux.intel.com, peter.ujfalusi@ti.com, tomi.valkeinen@ti.com, tiwai@suse.de, rmk+kernel@arm.linux.org.uk, p.zabel@pengutronix.de, arnaud.pouliquen@st.com, Jyri Sarha Subject: [PATCH] drm/i2c: tda998x: fix ptr_ret.cocci warnings Message-ID: <20160309001555.GA169235@lkp-ib03> References: <201603090818.7sT7ovZf%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <7e2cd007e1ea3217c817fb4e7782b0bfe11ea56c.1457465383.git.jsarha@ti.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-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP drivers/gpu/drm/i2c/tda998x_drv.c:1329: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 CC: Jyri Sarha Signed-off-by: Fengguang Wu --- tda998x_drv.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/gpu/drm/i2c/tda998x_drv.c +++ b/drivers/gpu/drm/i2c/tda998x_drv.c @@ -1326,10 +1326,7 @@ static int tda998x_audio_codec_init(stru dev, HDMI_CODEC_DRV_NAME, PLATFORM_DEVID_AUTO, &codec_data, sizeof(codec_data)); - if (IS_ERR(priv->audio_pdev)) - return PTR_ERR(priv->audio_pdev); - - return 0; + return PTR_ERR_OR_ZERO(priv->audio_pdev); } /* I2C driver functions */