Commit 07a2e1cf authored by Jan Glauber's avatar Jan Glauber Committed by David S. Miller
Browse files

net: cavium: fix NULL pointer dereference in cavium_ptp_put

Prevent a kernel panic on reboot if ptp_clock is NULL by checking
the ptp pointer before using it.
Signed-off-by: default avatarJan Glauber <>
Fixes: 8c56df37

 ("net: add support for Cavium PTP coprocessor")
Cc: Radoslaw Biernacki <>
Cc: Aleksey Makarov <>
Signed-off-by: default avatarDavid S. Miller <>
parent 027d351c
......@@ -75,6 +75,8 @@ EXPORT_SYMBOL(cavium_ptp_get);
void cavium_ptp_put(struct cavium_ptp *ptp)
if (!ptp)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment