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-next>] [day] [month] [year] [list]
Message-ID: <20200709160618.GA43595@e574ca468740>
Date:   Fri, 10 Jul 2020 00:06:18 +0800
From:   kernel test robot <lkp@...el.com>
To:     Antoine Tenart <antoine.tenart@...tlin.com>
Cc:     kbuild-all@...ts.01.org,
        Quentin Schulz <quentin.schulz@...tlin.com>,
        Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Russell King <linux@...linux.org.uk>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] net: phy: mscc: fix ptr_ret.cocci warnings

From: kernel test robot <lkp@...el.com>

drivers/net/phy/mscc/mscc_ptp.c:1496: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: 7d272e63e097 ("net: phy: mscc: timestamping and PHC support")
CC: Antoine Tenart <antoine.tenart@...tlin.com>
Signed-off-by: kernel test robot <lkp@...el.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   b966b5cf71790478be7726593d011cb085a97a94
commit: 7d272e63e0979d38a6256108adbe462d621c26c5 [2625/6900] net: phy: mscc: timestamping and PHC support

 mscc_ptp.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/net/phy/mscc/mscc_ptp.c
+++ b/drivers/net/phy/mscc/mscc_ptp.c
@@ -1493,10 +1493,7 @@ static int __vsc8584_init_ptp(struct phy
 
 	vsc8531->ptp->ptp_clock = ptp_clock_register(&vsc8531->ptp->caps,
 						     &phydev->mdio.dev);
-	if (IS_ERR(vsc8531->ptp->ptp_clock))
-		return PTR_ERR(vsc8531->ptp->ptp_clock);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(vsc8531->ptp->ptp_clock);
 }
 
 void vsc8584_config_ts_intr(struct phy_device *phydev)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ