lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1599123916-65530-1-git-send-email-xuwei5@hisilicon.com>
Date:   Thu, 3 Sep 2020 17:05:16 +0800
From:   Wei Xu <xuwei5@...ilicon.com>
To:     <lorenzo.pieralisi@....com>, <bhelgaas@...gle.com>
CC:     <xuwei5@...ilicon.com>, <linuxarm@...wei.com>,
        <shameerali.kolothum.thodi@...wei.com>,
        <jonathan.cameron@...wei.com>, <john.garry@...wei.com>,
        <salil.mehta@...wei.com>, <shiju.jose@...wei.com>,
        <jinying@...ilicon.com>, <zhangyi.ac@...wei.com>,
        <liguozhu@...ilicon.com>, <tangkunshan@...wei.com>,
        <huangdaode@...ilicon.com>, Jingoo Han <jingoohan1@...il.com>,
        Rob Herring <robh@...nel.org>, Kukjin Kim <kgene@...nel.org>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        <linux-pci@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-samsung-soc@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] PCI: exynos: simplify with PTR_ERR_OR_ZERO

Use PTR_ERR_OR_ZERO to make the code a little bit simpler.
This code was detected with the help of Coccinelle.

Signed-off-by: Wei Xu <xuwei5@...ilicon.com>
---
 drivers/pci/controller/dwc/pci-exynos.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/pci/controller/dwc/pci-exynos.c b/drivers/pci/controller/dwc/pci-exynos.c
index 8d82c43..f59f027 100644
--- a/drivers/pci/controller/dwc/pci-exynos.c
+++ b/drivers/pci/controller/dwc/pci-exynos.c
@@ -90,10 +90,7 @@ static int exynos5440_pcie_get_mem_resources(struct platform_device *pdev,
 		return -ENOMEM;
 
 	ep->mem_res->elbi_base = devm_platform_ioremap_resource(pdev, 0);
-	if (IS_ERR(ep->mem_res->elbi_base))
-		return PTR_ERR(ep->mem_res->elbi_base);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(ep->mem_res->elbi_base);
 }
 
 static int exynos5440_pcie_get_clk_resources(struct exynos_pcie *ep)
-- 
2.8.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ