Subject: Re: [RFC PATCH 12/16] dsa: Make mdio bus optional

From: Vivien Didelot <[email-masked]>
Date: Fri, 27 May 2016 10:55:45 -0400

Hi Andrew,

Andrew Lunn <[email-masked]> writes:

> -	mdiobus_unregister(ds->slave_mii_bus);
> +	if (ds->slave_mii_bus && ds->drv->phy_read)
> +		mdiobus_unregister(ds->slave_mii_bus);

So if a driver registered the slave MII bus itself, it may have
unregistered it itself as well, so checking ds->slave_mii_bus is OK
(assuming the driver correctly zero'ed it).

But is it necessary to check ds->drv->phy_read?

Thanks,

        Vivien