linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: rockchip: fix ptr_ret.cocci warnings
       [not found] <201911232241.hpfCGEx5%lkp@intel.com>
@ 2019-11-23 14:06 ` kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-11-23 14:06 UTC (permalink / raw)
  To: Robin Murphy
  Cc: Lorenzo Pieralisi, kbuild-all, Heiko Stuebner, linux-pci,
	Shawn Lin, linux-rockchip, Mark Brown, Bjorn Helgaas,
	Andrew Murray, linux-arm-kernel

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

drivers/pci/controller/pcie-rockchip-host.c:628: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: 1e4d40186026 ("PCI: rockchip: Make some regulators non-optional")
CC: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: kbuild test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   b9d3d01405061bb42358fe53f824e894a1922ced
commit: 1e4d401860268bbed124eb93a0010237bd8ed26c [12858/13503] PCI: rockchip: Make some regulators non-optional

 pcie-rockchip-host.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/pci/controller/pcie-rockchip-host.c
+++ b/drivers/pci/controller/pcie-rockchip-host.c
@@ -625,10 +625,7 @@ static int rockchip_pcie_parse_host_dt(s
 		return PTR_ERR(rockchip->vpcie1v8);
 
 	rockchip->vpcie0v9 = devm_regulator_get(dev, "vpcie0v9");
-	if (IS_ERR(rockchip->vpcie0v9))
-		return PTR_ERR(rockchip->vpcie0v9);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(rockchip->vpcie0v9);
 }
 
 static int rockchip_pcie_set_vpcie(struct rockchip_pcie *rockchip)

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-11-23 14:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <201911232241.hpfCGEx5%lkp@intel.com>
2019-11-23 14:06 ` [PATCH] PCI: rockchip: 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).