[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180711233041.GA39597@lkp-sbx04>
Date: Thu, 12 Jul 2018 07:30:41 +0800
From: kbuild test robot <fengguang.wu@...el.com>
To: Shawn Lin <shawn.lin@...k-chips.com>
Cc: kbuild-all@...org, linux-kernel@...r.kernel.org,
Bjorn Helgaas <helgaas@...nel.org>,
Thierry Reding <thierry.reding@...il.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Jonathan Hunter <jonathanh@...dia.com>,
linux-tegra@...r.kernel.org, linux-pci@...r.kernel.org
Subject: [PATCH] PCI: fix ptr_ret.cocci warnings
From: kbuild test robot <fengguang.wu@...el.com>
drivers/pci/controller/pci-tegra.c:1132: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: 6e0832fa432e ("PCI: Collect all native drivers under drivers/pci/controller/")
CC: Shawn Lin <shawn.lin@...k-chips.com>
Signed-off-by: kbuild test robot <fengguang.wu@...el.com>
---
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
@@ -1129,10 +1129,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)
Powered by blists - more mailing lists