From: Hubert Feurstein Date: Wed, 7 Jan 2015 13:48:17 +0000 (+0100) Subject: net: fec: fix NULL pointer dereference in fec_enet_timeout_work X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0c8185944a125621a1766615585238a3563ccac3;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- 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) pdev->id_entry = of_id->data; fep->quirks = pdev->id_entry->driver_data; + fep->netdev = ndev; fep->num_rx_queues = num_rx_qs; fep->num_tx_queues = num_tx_qs;