Philipp Zabel 81f35ffde0 net: fec: ptp: fix NULL pointer dereference if ptp_clock is not set
Since commit 278d24047891 (net: fec: ptp: Enable PPS output based on ptp clock)
fec_enet_interrupt calls fec_ptp_check_pps_event unconditionally, which calls
into ptp_clock_event. If fep->ptp_clock is NULL, ptp_clock_event tries to
dereference the NULL pointer.
Since on i.MX53 fep->bufdesc_ex is not set, fec_ptp_init is never called,
and fep->ptp_clock is NULL, which reliably causes a kernel panic.

This patch adds a check for fep->ptp_clock == NULL in fec_enet_interrupt.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-22 17:48:06 -04:00
..
2014-10-11 11:34:07 -07:00
2014-10-15 07:23:49 +02:00
2014-10-08 17:37:16 -04:00
2014-10-10 22:07:55 -04:00
2014-09-22 16:48:47 +09:00
2014-10-15 07:23:49 +02:00
2014-10-10 16:40:14 -04:00
2014-10-07 21:29:18 -04:00
2014-10-15 06:58:16 +02:00
2014-10-11 06:47:50 -04:00
2014-10-11 20:29:01 -04:00
2014-10-08 17:37:16 -04:00
2014-10-15 07:23:49 +02:00
2014-10-10 16:40:14 -04:00
2014-10-11 20:29:01 -04:00