From patchwork Thu Mar 24 12:03:54 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: 8660161 Return-Path: X-Original-To: patchwork-dri-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 3CCE99F44D for ; Thu, 24 Mar 2016 12:05:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6A682203B6 for ; Thu, 24 Mar 2016 12:05:39 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 8D26A203B4 for ; Thu, 24 Mar 2016 12:05:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E87F66E988; Thu, 24 Mar 2016 12:05:30 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 535646E988 for ; Thu, 24 Mar 2016 12:05:27 +0000 (UTC) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 24 Mar 2016 05:05:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,385,1455004800"; d="scan'208";a="944129899" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by fmsmga002.fm.intel.com with ESMTP; 24 Mar 2016 05:05:22 -0700 Received: from kbuild by bee with local (Exim 4.83) (envelope-from ) id 1aj40t-000G4F-6e; Thu, 24 Mar 2016 20:05:19 +0800 Date: Thu, 24 Mar 2016 20:03:54 +0800 From: kbuild test robot To: Enric Balletbo i Serra Subject: [PATCH] drm: bridge: anx78xx: fix ptr_ret.cocci warnings Message-ID: <20160324120354.GA19673@lkp-ne04.intel.com> References: <201603241923.Li3nxzq9%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1458816106-11596-4-git-send-email-enric.balletbo@collabora.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: mark.rutland@arm.com, sjoerd.simons@collabora.co.uk, laurent.pinchart@ideasonboard.com, devel@driverdev.osuosl.org, drinkcat@chromium.org, cawa.cheng@mediatek.com, nathan.chung@mediatek.com, javier@dowhile0.org, treding@nvidia.com, dan.carpenter@oracle.com, devicetree@vger.kernel.org, pawel.moll@arm.com, ijc+devicetree@hellion.org.uk, robh+dt@kernel.org, dri-devel@lists.freedesktop.org, eddie.huang@mediatek.com, cjiao@analogixsemi.com, jb.tsai@mediatek.com, gregkh@linuxfoundation.org, emil.l.velikov@gmail.com, linux-kernel@vger.kernel.org, kbuild-all@01.org, galak@codeaurora.org, span@analogixsemi.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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/bridge/anx78xx.c:632: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: Enric Balletbo i Serra Signed-off-by: Fengguang Wu --- anx78xx.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/gpu/drm/bridge/anx78xx.c +++ b/drivers/gpu/drm/bridge/anx78xx.c @@ -629,10 +629,7 @@ static int anx78xx_init_gpio(struct anx7 /* GPIO for V10 power control */ pdata->gpiod_v10 = devm_gpiod_get_optional(dev, "v10", GPIOD_OUT_LOW); - if (IS_ERR(pdata->gpiod_v10)) - return PTR_ERR(pdata->gpiod_v10); - - return 0; + return PTR_ERR_OR_ZERO(pdata->gpiod_v10); } static int anx78xx_dp_link_training(struct anx78xx *anx78xx)