Re: [PATCH v2 2/2] net: phy: Don't use drv when it is NULL in phy_attached_print

2017-08-21 Thread Florian Fainelli
On 08/21/2017 07:24 AM, Andrew Lunn wrote: > On Mon, Aug 21, 2017 at 01:45:30PM +0200, Romain Perier wrote: >> Currently, if this logging function is used prior the phy driver is >> bound to the phy device (that is usually done from .ndo_open), >> 'phydev->drv' might be NULL, resulting in a kernel

Re: [PATCH v2 2/2] net: phy: Don't use drv when it is NULL in phy_attached_print

2017-08-21 Thread Andrew Lunn
On Mon, Aug 21, 2017 at 01:45:30PM +0200, Romain Perier wrote: > Currently, if this logging function is used prior the phy driver is > bound to the phy device (that is usually done from .ndo_open), > 'phydev->drv' might be NULL, resulting in a kernel crash. That is > typically the case in the stmma

[PATCH v2 2/2] net: phy: Don't use drv when it is NULL in phy_attached_print

2017-08-21 Thread Romain Perier
Currently, if this logging function is used prior the phy driver is bound to the phy device (that is usually done from .ndo_open), 'phydev->drv' might be NULL, resulting in a kernel crash. That is typically the case in the stmmac driver, info about the phy is displayed during the registration of th