svn commit: r352137 - head/sys/net
Hans Petter Selasky
hselasky at FreeBSD.org
Tue Sep 10 14:33:07 UTC 2019
Author: hselasky
Date: Tue Sep 10 14:33:07 2019
New Revision: 352137
URL: https://svnweb.freebsd.org/changeset/base/352137
Log:
Callout drain does not have to be followed by a callout stop call.
Fix bogus code.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Modified:
head/sys/net/if_spppsubr.c
Modified: head/sys/net/if_spppsubr.c
==============================================================================
--- head/sys/net/if_spppsubr.c Tue Sep 10 14:30:10 2019 (r352136)
+++ head/sys/net/if_spppsubr.c Tue Sep 10 14:33:07 2019 (r352137)
@@ -1060,15 +1060,13 @@ sppp_detach(struct ifnet *ifp)
KASSERT(mtx_initialized(&sp->mtx), ("sppp mutex is not initialized"));
/* Stop keepalive handler. */
- if (!callout_drain(&sp->keepalive_callout))
- callout_stop(&sp->keepalive_callout);
+ callout_drain(&sp->keepalive_callout);
for (i = 0; i < IDX_COUNT; i++) {
- if (!callout_drain(&sp->ch[i]))
- callout_stop(&sp->ch[i]);
+ callout_drain(&sp->ch[i]);
}
- if (!callout_drain(&sp->pap_my_to_ch))
- callout_stop(&sp->pap_my_to_ch);
+ callout_drain(&sp->pap_my_to_ch);
+
mtx_destroy(&sp->pp_cpq.ifq_mtx);
mtx_destroy(&sp->pp_fastq.ifq_mtx);
mtx_destroy(&sp->mtx);
More information about the svn-src-all
mailing list