Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Sep 2019 14:33:07 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r352137 - head/sys/net
Message-ID:  <201909101433.x8AEX7aq040847@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909101433.x8AEX7aq040847>