sfc: check for NULL efx->ptp_data in efx_ptp_event
authorEdward Cree <ecree@solarflare.com>
Tue, 25 Feb 2014 13:17:59 +0000 (13:17 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Feb 2014 20:22:02 +0000 (15:22 -0500)
commit8f355e5cee63c2c0c145d8206c4245d0189f47ff
treec26bdef2e3dabe83e777bd34d7facff3786f43c3
parent9a9bfd032f0207dd6e63c84b7676b58f160af04b
sfc: check for NULL efx->ptp_data in efx_ptp_event

If we receive a PTP event from the NIC when we haven't set up PTP state
in the driver, we attempt to read through a NULL pointer efx->ptp_data,
triggering a panic.

Signed-off-by: Edward Cree <ecree@solarflare.com>
Acked-by: Shradha Shah <sshah@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sfc/ptp.c