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: 10565385 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 179F11057 for ; Tue, 14 Aug 2018 11:45:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 02BD829934 for ; Tue, 14 Aug 2018 11:45:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA7D829966; Tue, 14 Aug 2018 11:45:55 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham 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 988D129934 for ; Tue, 14 Aug 2018 11:45:55 +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=4J/dUhmyYKi/QlNQzHwJZe90YB31wwJnJOHQu2f12y4=; b=WZeRs0Xi6zCwkS SFwwEeQo/p0LE5DQLMmjAfqmjmuEkUsgm6WXdZOxs6xhPdySbIigdfE6l7oubSTQuwlmdBpnNYVDj YSPSE4/hYNvYxssbqpbH5uXb/utyPRK2nUiKahgiXFUppV9h1wmVexxhphjLJIYD4y2t4lZviit4g F/bSrKW2iFTugg799/O3233+s9JMlt2wFismqRO7z7V+SjZyaLRClbmTRP1Ak7P+SSzwT3EefQZko RSBqJ+RIT1mhxscdaOoJgI2+KEHydyUTalj4MtMmbnvYsVopjvhMzE4Y/kwu7E4KPYRRgGdSUqtQr NTwL9oXBokZBy7iD4IJg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fpXlp-0001Ib-TR; Tue, 14 Aug 2018 11:45:53 +0000 Received: from mga06.intel.com ([134.134.136.31]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fpXlh-00018M-Gu; Tue, 14 Aug 2018 11:45:47 +0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.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 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) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180814_044545_609524_650BE3A6 X-CRM114-Status: GOOD ( 13.23 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Hanjie Lin , Kevin Hilman , linux-kernel@vger.kernel.org, Yue Wang , kbuild-all@01.org, linux-pci@vger.kernel.org, Bjorn Helgaas , linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.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)