linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/pci/controller/pci-tegra.c:1365:1-3: WARNING: PTR_ERR_OR_ZERO can be used
@ 2019-12-27 12:18 kbuild test robot
  2019-12-27 12:18 ` [PATCH] PCI: fix ptr_ret.cocci warnings kbuild test robot
  0 siblings, 1 reply; 2+ messages in thread
From: kbuild test robot @ 2019-12-27 12:18 UTC (permalink / raw)
  To: Palmer Dabbelt; +Cc: kbuild-all, linux-kernel, Bjorn Helgaas, Michal Simek

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   46cf053efec6a3a5f343fead837777efe8252a46
commit: 191d6f91f283dfb007499bb8529d54c3ac434bd7 PCI: Remove PCI_MSI_IRQ_DOMAIN architecture whitelist
date:   4 weeks ago

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>


coccinelle warnings: (new ones prefixed by >>)

>> drivers/pci/controller/pci-tegra.c:1365:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] PCI: fix ptr_ret.cocci warnings
  2019-12-27 12:18 drivers/pci/controller/pci-tegra.c:1365:1-3: WARNING: PTR_ERR_OR_ZERO can be used kbuild test robot
@ 2019-12-27 12:18 ` kbuild test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2019-12-27 12:18 UTC (permalink / raw)
  To: Palmer Dabbelt
  Cc: kbuild-all, linux-kernel, Bjorn Helgaas, Michal Simek,
	Thierry Reding, Lorenzo Pieralisi, Andrew Murray,
	Jonathan Hunter, linux-tegra, linux-pci

From: kbuild test robot <lkp@intel.com>

drivers/pci/controller/pci-tegra.c:1365: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: 191d6f91f283 ("PCI: Remove PCI_MSI_IRQ_DOMAIN architecture whitelist")
CC: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: kbuild test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   46cf053efec6a3a5f343fead837777efe8252a46
commit: 191d6f91f283dfb007499bb8529d54c3ac434bd7 PCI: Remove PCI_MSI_IRQ_DOMAIN architecture whitelist

 pci-tegra.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/pci/controller/pci-tegra.c
+++ b/drivers/pci/controller/pci-tegra.c
@@ -1362,10 +1362,7 @@ static int tegra_pcie_resets_get(struct
 		return PTR_ERR(pcie->afi_rst);
 
 	pcie->pcie_xrst = devm_reset_control_get_exclusive(dev, "pcie_x");
-	if (IS_ERR(pcie->pcie_xrst))
-		return PTR_ERR(pcie->pcie_xrst);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(pcie->pcie_xrst);
 }
 
 static int tegra_pcie_phys_get_legacy(struct tegra_pcie *pcie)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-27 12:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-27 12:18 drivers/pci/controller/pci-tegra.c:1365:1-3: WARNING: PTR_ERR_OR_ZERO can be used kbuild test robot
2019-12-27 12:18 ` [PATCH] PCI: fix ptr_ret.cocci warnings kbuild test robot

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).