From patchwork Sun Mar 4 13:04:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kernel test robot X-Patchwork-Id: 10257661 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 5698A602B5 for ; Sun, 4 Mar 2018 13:05:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 47A3B28790 for ; Sun, 4 Mar 2018 13:05:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3BEEA287E0; Sun, 4 Mar 2018 13:05:21 +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,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0540428790 for ; Sun, 4 Mar 2018 13:05:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=poMeUg8DildBxEWSR95amWJKGzSnQtEtIuJ+C/kdljs=; b=FmrEyAJSNWpGs2 om7ceNLxo+BK649qpOvtHsGl7wCf5rLV6lofU0aomDRa5jXS+x5n5BhLyWJrTg3hV+7r2ygRw2e0w AFpzfMpPGVQhe3PaVXakiM3czvHX/N5uh8bPX0Gz96hzUs8thIp1ewYVW/KS72Vy5dKQFYAfO7STm gF8ralYsYq3qFsfJxM3fbnr78lxWvNghUCbp5AHeBv0YBBhyeW9Dj8G9tr3DbrT1h4SqL4n21kqex 2eSlFDESlJysM4Qs68KgE2Cgg5ucNPzRpSkQQaUDdsdkKC0+Soj7qVu7h62gxawBU3tKEss/7wDx0 b+MwMGaOD5avkF2axvzw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1esTKG-00027g-R3; Sun, 04 Mar 2018 13:05:16 +0000 Received: from mga09.intel.com ([134.134.136.24]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1esTKB-0000rp-IJ; Sun, 04 Mar 2018 13:05:12 +0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Mar 2018 05:04:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,423,1515484800"; d="scan'208";a="208737433" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by fmsmga006.fm.intel.com with ESMTP; 04 Mar 2018 05:04:55 -0800 Received: from kbuild by bee with local (Exim 4.84_2) (envelope-from ) id 1esTK1-0005ah-R5; Sun, 04 Mar 2018 21:05:01 +0800 Date: Sun, 4 Mar 2018 21:04:28 +0800 From: kbuild test robot To: Andrey Smirnov Subject: [PATCH] nvmem: lpc18xx_otp: fix ptr_ret.cocci warnings Message-ID: <20180304130428.GA11571@lkp-hsx02> References: <20180228144106.16363-14-andrew.smirnov@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180228144106.16363-14-andrew.smirnov@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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180304_050511_695613_A6586D64 X-CRM114-Status: GOOD ( 21.82 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, Heiko Stuebner , linux-rockchip@lists.infradead.org, Andrey Smirnov , Kevin Hilman , linux-kernel@vger.kernel.org, Masahiro Yamada , Srinivas Kandagatla , kbuild-all@01.org, linux-amlogic@lists.infradead.org, Carlo Caione , linux-mediatek@lists.infradead.org, cphealy@gmail.com, Matthias Brugger Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Fengguang Wu drivers/nvmem/lpc18xx_otp.c:90: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: e738282235ec ("nvmem: lpc18xx_otp: Convert to use devm_nvmem_register()") CC: Andrey Smirnov Signed-off-by: Fengguang Wu --- lpc18xx_otp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/nvmem/lpc18xx_otp.c +++ b/drivers/nvmem/lpc18xx_otp.c @@ -87,10 +87,7 @@ static int lpc18xx_otp_probe(struct plat lpc18xx_otp_nvmem_config.priv = otp; nvmem = devm_nvmem_register(&pdev->dev, &lpc18xx_otp_nvmem_config); - if (IS_ERR(nvmem)) - return PTR_ERR(nvmem); - - return 0; + return PTR_ERR_OR_ZERO(nvmem); } static const struct of_device_id lpc18xx_otp_dt_ids[] = {