lkml.org 
[lkml]   [2017]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] PCI: tegra: Use PTR_ERR_OR_ZERO
Date
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
---
drivers/pci/host/pci-tegra.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index 9c40da5..90cda5b 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -1156,10 +1156,7 @@ static int tegra_pcie_resets_get(struct tegra_pcie *pcie)
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)
--
2.7.4
\
 
 \ /
  Last update: 2017-08-29 15:39    [W:0.362 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site