[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151218134415.GA31877@lkp-hsx03>
Date: Fri, 18 Dec 2015 21:44:15 +0800
From: kbuild test robot <lkp@...el.com>
To: Stanimir Varbanov <stanimir.varbanov@...aro.org>
Cc: kbuild-all@...org, linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
devicetree@...r.kernel.org, linux-pci@...r.kernel.org,
Bjorn Helgaas <bhelgaas@...gle.com>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Russell King <linux@....linux.org.uk>,
Rob Herring <robh+dt@...nel.org>,
Rob Herring <robh@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Pawel Moll <pawel.moll@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Arnd Bergmann <arnd@...db.de>,
Jingoo Han <jingoohan1@...il.com>,
Pratyush Anand <pratyush.anand@...il.com>,
Bjorn Andersson <bjorn.andersson@...ymobile.com>,
Stanimir Varbanov <svarbanov@...sol.com>,
Stanimir Varbanov <stanimir.varbanov@...aro.org>
Subject: [PATCH] PCI: qcom: fix ptr_ret.cocci warnings
drivers/pci/host/pcie-qcom.c:188:1-3: WARNING: PTR_ERR_OR_ZERO can be used
drivers/pci/host/pcie-qcom.c:220: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
CC: Stanimir Varbanov <svarbanov@...sol.com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---
pcie-qcom.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
--- a/drivers/pci/host/pcie-qcom.c
+++ b/drivers/pci/host/pcie-qcom.c
@@ -185,10 +185,7 @@ static int qcom_pcie_get_resources_v0(st
return PTR_ERR(res->por_reset);
res->phy_reset = devm_reset_control_get(dev, "phy");
- if (IS_ERR(res->phy_reset))
- return PTR_ERR(res->phy_reset);
-
- return 0;
+ return PTR_ERR_OR_ZERO(res->phy_reset);
}
static int qcom_pcie_get_resources_v1(struct qcom_pcie *pcie)
@@ -217,10 +214,7 @@ static int qcom_pcie_get_resources_v1(st
return PTR_ERR(res->slave_bus);
res->core = devm_reset_control_get(dev, "core");
- if (IS_ERR(res->core))
- return PTR_ERR(res->core);
-
- return 0;
+ return PTR_ERR_OR_ZERO(res->core);
}
static void qcom_pcie_deinit_v0(struct qcom_pcie *pcie)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists