[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <8712e54912598b3ca6f00d00ff8fbfdd1c53e7e8.1574170028.git.michal.simek@xilinx.com>
Date: Tue, 19 Nov 2019 14:27:11 +0100
From: Michal Simek <michal.simek@...inx.com>
To: linux-kernel@...r.kernel.org, monstr@...str.eu,
michal.simek@...inx.com, git@...inx.com
Cc: Andrew Lunn <andrew@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Florian Fainelli <f.fainelli@...il.com>,
Heiner Kallweit <hkallweit1@...il.com>, netdev@...r.kernel.org
Subject: [PATCH] phy: mdio_bus: Check ENOTSUPP instead of ENOSYS in mdiobus_register_reset
Origin patch was using ENOTSUPP instead of ENOSYS. Silently changing error
value ends up in an access to bad area on Microblaze with axi ethernet
driver.
Fixes: 1d4639567d97 ("mdio_bus: Fix PTR_ERR applied after initialization to constant")
Signed-off-by: Michal Simek <michal.simek@...inx.com>
---
I didn't track it down where exactly that access happens but the patch is
clearly just changing something without description.
The origin patch has been merged between rc7 and rc8 and would be good to
get this fix to v5.4.
---
drivers/net/phy/mdio_bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index 35876562e32a..dbacb0031877 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -65,7 +65,7 @@ static int mdiobus_register_reset(struct mdio_device *mdiodev)
reset = devm_reset_control_get_exclusive(&mdiodev->dev,
"phy");
if (IS_ERR(reset)) {
- if (PTR_ERR(reset) == -ENOENT || PTR_ERR(reset) == -ENOSYS)
+ if (PTR_ERR(reset) == -ENOENT || PTR_ERR(reset) == -ENOTSUPP)
reset = NULL;
else
return PTR_ERR(reset);
--
2.17.1
Powered by blists - more mailing lists