On Wed, Feb 8, 2017 at 5:37 AM, Florian Fainelli <f.faine...@gmail.com> wrote:
> The Generic PHY drivers gets assigned after we checked that the current PHY
> driver is NULL, so we need to check a few things before we can safely
> derference d->driver. Update phy_attach_direct() and phy_detach() accordingly
> to be resilient to these cases.
>
> Even though the Generic PHY driver defaults to phy_probe() which can hardly
> fail at the moment, let's fix the label so we don't call phy_detach() on a
> network device we have not attached yet.
>
> Fixes: cafe8df8b9bc ("net: phy: Fix lack of reference count on PHY driver")
> Signed-off-by: Florian Fainelli <f.faine...@gmail.com>

This fixes the kernel crash:

Tested-by: Fabio Estevam <fabio.este...@nxp.com>

Reply via email to