From patchwork Tue Aug 14 11:45:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fengguang Wu X-Patchwork-Id: 10565381 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F0CB41515 for ; Tue, 14 Aug 2018 11:45:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D6FA029934 for ; Tue, 14 Aug 2018 11:45:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CAAE829966; Tue, 14 Aug 2018 11:45:35 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 6FF0029934 for ; Tue, 14 Aug 2018 11:45:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729560AbeHNOcW (ORCPT ); Tue, 14 Aug 2018 10:32:22 -0400 Received: from mga18.intel.com ([134.134.136.126]:55709 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727885AbeHNOcW (ORCPT ); Tue, 14 Aug 2018 10:32:22 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Aug 2018 04:45:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,238,1531810800"; d="scan'208";a="62292854" Received: from bee.sh.intel.com (HELO lkp-server01) ([10.239.97.14]) by fmsmga007.fm.intel.com with ESMTP; 14 Aug 2018 04:45:32 -0700 Received: from kbuild by lkp-server01 with local (Exim 4.89) (envelope-from ) id 1fpXlJ-0006xN-7U; Tue, 14 Aug 2018 19:45:21 +0800 Date: Tue, 14 Aug 2018 19:45:18 +0800 From: kbuild test robot To: Hanjie Lin Cc: kbuild-all@01.org, Bjorn Helgaas , Yue Wang , Hanjie Lin , Kevin Hilman , Rob Herring , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org Subject: [PATCH] PCI: meson: fix ptr_ret.cocci warnings Message-ID: <20180814114518.GA82641@lkp-ib04> References: <1534227522-186798-3-git-send-email-hanjie.lin@amlogic.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1534227522-186798-3-git-send-email-hanjie.lin@amlogic.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: kbuild test robot drivers/pci/controller/dwc/pci-meson.c:121: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: b43bb00f7533 ("PCI: meson: add the Amlogic Meson PCIe controller driver") CC: Yue Wang Signed-off-by: kbuild test robot --- pci-meson.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/pci/controller/dwc/pci-meson.c +++ b/drivers/pci/controller/dwc/pci-meson.c @@ -118,10 +118,7 @@ static int meson_pcie_get_mem(struct pla return -ENODEV; mp->mem_res.cfg_base = devm_ioremap_resource(dev, res); - if (IS_ERR(mp->mem_res.cfg_base)) - return PTR_ERR(mp->mem_res.cfg_base); - - return 0; + return PTR_ERR_OR_ZERO(mp->mem_res.cfg_base); } static int meson_pcie_init_clk(struct meson_pcie *mp)