[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20191221011855.qmnf2jj5cetedtw6@4978f4969bb8>
Date: Sat, 21 Dec 2019 09:18:55 +0800
From: kbuild test robot <lkp@...el.com>
To: Lorenzo Pieralisi <lorenzo.pieralisi@....com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Bjorn Helgaas <helgaas@...nel.org>,
Shawn Lin <shawn.lin@...k-chips.com>,
Andrew Murray <andrew.murray@....com>,
Heiko Stuebner <heiko@...ech.de>, linux-pci@...r.kernel.org,
linux-rockchip@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org
Subject: [PATCH] fix ptr_ret.cocci warnings
From: kbuild test robot <lkp@...el.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: 069ade5dfec9 ("Merge branch 'remotes/lorenzo/pci/rockchip'")
Signed-off-by: kbuild test robot <lkp@...el.com>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b371ddb94fae82b6565020639b7db31934043c65
commit: 069ade5dfec93dd2916a85df8b1bab2d578857bd Merge branch 'remotes/lorenzo/pci/rockchip'
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)
Powered by blists - more mailing lists