net: ethernet: mediatek: get out of potential invalid pointer access
authorSean Wang <sean.wang@mediatek.com>
Thu, 22 Sep 2016 08:44:16 +0000 (16:44 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Sep 2016 12:22:28 +0000 (08:22 -0400)
commitf6f7d9c03f5daae04449ad19de5e2f0c20c5eaac
treeb1a78b9d77b5e806ca9ad88a4fa3c3f5aeb35502
parent3e60b748fd2f50bbdb6a61fdd48222cd492c77e3
net: ethernet: mediatek: get out of potential invalid pointer access

Potential dangerous invalid pointer might be accessed if
the error happens when couple phy_device to net_device so
cleanup the error path.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_eth_soc.c