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: 
 <SJ0PR18MB5216EFA6E40EF5FAC4C096A0DBF52@SJ0PR18MB5216.namprd18.prod.outlook.com>
Date: Fri, 24 May 2024 09:28:44 +0000
From: Suman Ghosh <sumang@...vell.com>
To: Horatiu Vultur <horatiu.vultur@...rochip.com>,
        "andrew@...n.ch"
	<andrew@...n.ch>,
        "hkallweit1@...il.com" <hkallweit1@...il.com>,
        "linux@...linux.org.uk" <linux@...linux.org.uk>,
        "davem@...emloft.net"
	<davem@...emloft.net>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [EXTERNAL] [PATCH net v2] net: micrel: Fix lan8841_config_intr
 after getting out of sleep mode

>diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index
>13e30ea7eec5d..c0773d74d5104 100644
>--- a/drivers/net/phy/micrel.c
>+++ b/drivers/net/phy/micrel.c
>@@ -4029,7 +4029,7 @@ static int lan8841_config_intr(struct phy_device
>*phydev)
>
> 	if (phydev->interrupts == PHY_INTERRUPT_ENABLED) {
> 		err = phy_read(phydev, LAN8814_INTS);
>-		if (err)
>+		if (err < 0)
> 			return err;
>
> 		/* Enable / disable interrupts. It is OK to enable PTP
>interrupt @@ -4045,6 +4045,14 @@ static int lan8841_config_intr(struct
>phy_device *phydev)
> 			return err;
>
> 		err = phy_read(phydev, LAN8814_INTS);
>+		if (err < 0)
>+			return err;
>+
>+		/* Getting a positive value doesn't mean that is an error, it
>+		 * just indicates what was the status. Therefore make sure to
>+		 * clear the value and say that there is no error.
>+		 */
>+		err = 0;
[Suman] Looks good to me.
Reviewed-by: Suman Ghosh <sumang@...vell.com>

> 	}
>
> 	return err;
>--
>2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ