[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6742276.xmgnFOC4z8@wuerfel>
Date: Thu, 28 Apr 2016 00:07:22 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Florian Fainelli <f.fainelli@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...oirfairelinux.com>,
"David S. Miller" <davem@...emloft.net>,
Sergei Shtylyov <sergei.shtylyov@...entembedded.com>,
netdev@...r.kernel.org, kernel@...oirfairelinux.com
Subject: Re: [PATCH 1/5] phylib: don't return NULL from get_phy_device()
On Wednesday 27 April 2016 14:47:29 Florian Fainelli wrote:
> diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
> index 499003ee8055..94a27b028dd8 100644
> --- a/drivers/net/phy/mdio_bus.c
> +++ b/drivers/net/phy/mdio_bus.c
> @@ -333,7 +333,7 @@ int __mdiobus_register(struct mii_bus *bus, struct
> module *owner)
> struct phy_device *phydev;
>
> phydev = mdiobus_scan(bus, i);
> - if (IS_ERR(phydev)) {
> + if (IS_ERR(phydev) && PTR_ERR(phydev) != -ENODEV) {
> err = PTR_ERR(phydev);
> goto error;
> }
>
>
I think that is an improvement over the original code, and better than
reverting the series. Out of the three callers of mdiobus_scan, I already
commented on drivers/net/ethernet/marvell/pxa168_eth.c being wrong to
start with, and drivers/net/ethernet/cadence/macb.c seems to require
the same fix that you did here for mdio_bus.c
Arnd
Powered by blists - more mailing lists