stmmac: set ptp_clock to NULL while unregister

This is to properly put to NULL the ptp_clock while un-register the PTP support.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Giuseppe CAVALLARO 2014-08-25 14:56:19 +02:00 committed by David S. Miller
parent 978aded4b3
commit f95f4045c7

View file

@ -206,6 +206,7 @@ void stmmac_ptp_unregister(struct stmmac_priv *priv)
{
if (priv->ptp_clock) {
ptp_clock_unregister(priv->ptp_clock);
priv->ptp_clock = NULL;
pr_debug("Removed PTP HW clock successfully on %s\n",
priv->dev->name);
}