diff options
author | Hubert Feurstein <h.feurstein@gmail.com> | 2015-01-07 14:48:17 +0100 |
---|---|---|
committer | Sasha Levin <alexander.levin@verizon.com> | 2016-09-02 14:43:37 -0400 |
commit | 47e617f9e58aa4a472c53a9ccfd6491e69bdb394 (patch) | |
tree | 5268dac889f81e214bffc8024bc0360a2be598ae | |
parent | 5de0c13e48a041dfc91b63a12a5b1ff37d3ed592 (diff) | |
download | lwn-47e617f9e58aa4a472c53a9ccfd6491e69bdb394.tar.gz lwn-47e617f9e58aa4a472c53a9ccfd6491e69bdb394.zip |
net: fec: fix NULL pointer dereference in fec_enet_timeout_work
[ Upstream commit 0c8185944a125621a1766615585238a3563ccac3 ]
This patch initialises the fep->netdev pointer. This pointer was not
initialised at all, but is used in fec_enet_timeout_work and in some
error paths.
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
-rw-r--r-- | drivers/net/ethernet/freescale/fec_main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 2ee3c9537772..51f65299094b 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -3166,6 +3166,7 @@ fec_probe(struct platform_device *pdev) /* setup board info structure */ fep = netdev_priv(ndev); + fep->netdev = ndev; fep->num_rx_queues = num_rx_qs; fep->num_tx_queues = num_tx_qs; |