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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1567665795-5901-4-git-send-email-zhongjiang@huawei.com>
Date:   Thu, 5 Sep 2019 14:43:14 +0800
From:   zhong jiang <zhongjiang@...wei.com>
To:     <tony@...mide.com>, <udeep.dutt@...el.com>,
        <ashutosh.dixit@...el.com>, <gregkh@...uxfoundation.org>,
        <kishon@...com>, <jonathanh@...dia.com>, <a.zummo@...ertech.it>,
        <alexandre.belloni@...tlin.com>
CC:     <zhongjiang@...wei.com>, <linux-kernel@...r.kernel.org>,
        <linux-rtc@...r.kernel.org>, <arnd@...db.de>,
        <lorenzo.pieralisi@....com>
Subject: [PATCH 3/4] phy: tegra: Use PTR_ERR_OR_ZERO rather than its implementation

PTR_ERR_OR_ZERO contains if(IS_ERR(...)) + PTR_ERR. It is better to
use it directly. hence just replace it.

Signed-off-by: zhong jiang <zhongjiang@...wei.com>
---
 drivers/phy/tegra/phy-tegra194-p2u.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/phy/tegra/phy-tegra194-p2u.c b/drivers/phy/tegra/phy-tegra194-p2u.c
index 7042bed..40bc550 100644
--- a/drivers/phy/tegra/phy-tegra194-p2u.c
+++ b/drivers/phy/tegra/phy-tegra194-p2u.c
@@ -92,10 +92,8 @@ static int tegra_p2u_probe(struct platform_device *pdev)
 	phy_set_drvdata(generic_phy, phy);
 
 	phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
-	if (IS_ERR(phy_provider))
-		return PTR_ERR(phy_provider);
 
-	return 0;
+	return PTR_ERR_OR_ZERO(phy_provider);
 }
 
 static const struct of_device_id tegra_p2u_id_table[] = {
-- 
1.7.12.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ