From patchwork Fri Mar 17 14:48:09 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: 9630875 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 71F3160245 for ; Fri, 17 Mar 2017 15:00:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 666C6285A1 for ; Fri, 17 Mar 2017 15:00:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B32C285E3; Fri, 17 Mar 2017 15:00:30 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9CB9285A1 for ; Fri, 17 Mar 2017 15:00:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751213AbdCQO7v (ORCPT ); Fri, 17 Mar 2017 10:59:51 -0400 Received: from mga06.intel.com ([134.134.136.31]:26096 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751271AbdCQO6q (ORCPT ); Fri, 17 Mar 2017 10:58:46 -0400 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP; 17 Mar 2017 07:48:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,177,1486454400"; d="scan'208";a="945462691" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by orsmga003.jf.intel.com with ESMTP; 17 Mar 2017 07:48:55 -0700 Received: from kbuild by bee with local (Exim 4.84_2) (envelope-from ) id 1cotDZ-000JpC-Qx; Fri, 17 Mar 2017 22:51:01 +0800 Date: Fri, 17 Mar 2017 22:48:09 +0800 From: kbuild test robot To: Olimpiu Dejeu Cc: kbuild-all@01.org, robh@kernel.org, lee.jones@linaro.org, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, devicetree@vger.kernel.org, jingoohan1@gmail.com, bdodge@arcticsand.com, joe@perches.com, medasaro@arcticsand.com, daniel.thompson@linaro.org, Olimpiu Dejeu Subject: [PATCH] fix ptr_ret.cocci warnings Message-ID: <20170317144809.GA103304@lkp-hsx03.lkp.intel.com> References: <201703172233.osJjGFrP%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1489607133-7870-3-git-send-email-olimpiu@arcticsand.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-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP drivers/video/backlight/arcxcnn_bl.c:183: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: Olimpiu Dejeu Signed-off-by: Fengguang Wu Acked-by: Olimpiu Dejeu --- arcxcnn_bl.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/video/backlight/arcxcnn_bl.c +++ b/drivers/video/backlight/arcxcnn_bl.c @@ -180,10 +180,7 @@ static int arcxcnn_backlight_register(st lp->bl = devm_backlight_device_register(lp->dev, name, lp->dev, lp, &arcxcnn_bl_ops, props); - if (IS_ERR(lp->bl)) - return PTR_ERR(lp->bl); - - return 0; + return PTR_ERR_OR_ZERO(lp->bl); } static void arcxcnn_parse_dt(struct arcxcnn *lp)