aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHubert Feurstein <h.feurstein@gmail.com>2015-01-07 08:48:17 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-08 23:12:28 -0500
commit0c8185944a125621a1766615585238a3563ccac3 (patch)
tree0097282aa0ec89d48393bbce27db64fdbbce4702
parentb284fbe3b3ef9cf8e03d90b576d17fe646312d6f (diff)
net: fec: fix NULL pointer dereference in fec_enet_timeout_work
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>
-rw-r--r--drivers/net/ethernet/freescale/fec_main.c1
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 5ebdf8dc8a31..dbcab1cecf68 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -3129,6 +3129,7 @@ fec_probe(struct platform_device *pdev)
3129 pdev->id_entry = of_id->data; 3129 pdev->id_entry = of_id->data;
3130 fep->quirks = pdev->id_entry->driver_data; 3130 fep->quirks = pdev->id_entry->driver_data;
3131 3131
3132 fep->netdev = ndev;
3132 fep->num_rx_queues = num_rx_qs; 3133 fep->num_rx_queues = num_rx_qs;
3133 fep->num_tx_queues = num_tx_qs; 3134 fep->num_tx_queues = num_tx_qs;
3134 3135