summaryrefslogtreecommitdiff
path: root/drivers/net/phy/mii_timestamper.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/phy/mii_timestamper.c')
-rw-r--r--drivers/net/phy/mii_timestamper.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/phy/mii_timestamper.c b/drivers/net/phy/mii_timestamper.c
index b71b7456462d..51ae0593a04f 100644
--- a/drivers/net/phy/mii_timestamper.c
+++ b/drivers/net/phy/mii_timestamper.c
@@ -111,6 +111,9 @@ void unregister_mii_timestamper(struct mii_timestamper *mii_ts)
struct mii_timestamping_desc *desc;
struct list_head *this;
+ if (!mii_ts)
+ return;
+
/* mii_timestamper statically registered by the PHY driver won't use the
* register_mii_timestamper() and thus don't have ->device set. Don't
* try to unregister these.