net: ethernet: davinci_emac: Fix devioctl while in fixed link
authorNeil Armstrong <narmstrong@baylibre.com>
Mon, 25 Apr 2016 17:41:38 +0000 (19:41 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Apr 2016 19:51:25 +0000 (15:51 -0400)
commit62522ef3c399996f6c8120bfd14b94280bc9f490
tree9c193dd9fdfbf9a11889ffb48b4006b4123e9d51
parenteee66af857d812304419eb5eed1f04f5f0c72e19
net: ethernet: davinci_emac: Fix devioctl while in fixed link

When configured in fixed link, the DaVinci emac driver sets the
priv->phydev to NULL and further ioctl calls to the phy_mii_ioctl()
causes the kernel to crash.

Cc: Brian Hutchinson <b.hutchman@gmail.com>
Fixes: 1bb6aa56bb38 ("net: davinci_emac: Add support for fixed-link PHY")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/davinci_emac.c