linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: Hanjie Lin <hanjie.lin@amlogic.com>
Cc: Rob Herring <robh@kernel.org>,
	Hanjie Lin <hanjie.lin@amlogic.com>,
	Kevin Hilman <khilman@baylibre.com>,
	linux-kernel@vger.kernel.org, Yue Wang <yue.wang@amlogic.com>,
	kbuild-all@01.org, linux-pci@vger.kernel.org,
	Bjorn Helgaas <bhelgaas@google.com>,
	linux-amlogic@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH] PCI: meson: fix ptr_ret.cocci warnings
Date: Tue, 14 Aug 2018 19:45:18 +0800	[thread overview]
Message-ID: <20180814114518.GA82641@lkp-ib04> (raw)
In-Reply-To: <1534227522-186798-3-git-send-email-hanjie.lin@amlogic.com>

From: kbuild test robot <fengguang.wu@intel.com>

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 <yue.wang@amlogic.com>
Signed-off-by: kbuild test robot <fengguang.wu@intel.com>
---

 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)

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2018-08-14 11:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-14  6:18 [PATCH 0/2] add the Amlogic Meson PCIe controller driver Hanjie Lin
2018-08-14  6:18 ` [PATCH 1/2] dt-bindings: PCI: meson: add DT bindings for Amlogic Meson PCIe controller Hanjie Lin
2018-08-14 10:41   ` Jerome Brunet
2018-08-16  3:11     ` Hanjie Lin
2018-08-14 22:53   ` Rob Herring
2018-08-16  3:14     ` Hanjie Lin
2018-08-14  6:18 ` [PATCH 2/2] PCI: meson: add the Amlogic Meson PCIe controller driver Hanjie Lin
2018-08-14 10:41   ` Jerome Brunet
2018-08-16  3:22     ` Hanjie Lin
2018-08-14 11:45   ` kbuild test robot
2018-08-14 11:45   ` kbuild test robot [this message]
2018-09-18 14:35     ` [PATCH] PCI: meson: fix ptr_ret.cocci warnings Lorenzo Pieralisi
2018-09-18 14:35       ` Lorenzo Pieralisi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180814114518.GA82641@lkp-ib04 \
    --to=fengguang.wu@intel.com \
    --cc=bhelgaas@google.com \
    --cc=hanjie.lin@amlogic.com \
    --cc=kbuild-all@01.org \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=yue.wang@amlogic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).