From: kbuild test robot <fengguang.wu@intel.com>
To: Shawn Lin <shawn.lin@rock-chips.com>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
Bjorn Helgaas <helgaas@kernel.org>,
Thierry Reding <thierry.reding@gmail.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
linux-tegra@vger.kernel.org, linux-pci@vger.kernel.org
Subject: [PATCH] PCI: fix ptr_ret.cocci warnings
Date: Thu, 12 Jul 2018 07:30:41 +0800 [thread overview]
Message-ID: <20180711233041.GA39597@lkp-sbx04> (raw)
In-Reply-To: <201807120738.oIXXb65q%fengguang.wu@intel.com>
From: kbuild test robot <fengguang.wu@intel.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@rock-chips.com>
Signed-off-by: kbuild test robot <fengguang.wu@intel.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)
next parent reply other threads:[~2018-07-11 23:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201807120738.oIXXb65q%fengguang.wu@intel.com>
2018-07-11 23:30 ` kbuild test robot [this message]
2018-09-18 14:18 ` [PATCH] PCI: fix ptr_ret.cocci warnings Lorenzo Pieralisi
2018-09-18 14:47 ` Thierry Reding
2018-09-18 16:30 ` Lorenzo Pieralisi
[not found] <201912272041.iVxC623g%lkp@intel.com>
2019-12-27 12:18 ` kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180711233041.GA39597@lkp-sbx04 \
--to=fengguang.wu@intel.com \
--cc=helgaas@kernel.org \
--cc=jonathanh@nvidia.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=shawn.lin@rock-chips.com \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox