summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/if_uath.c
diff options
context:
space:
mode:
authorjakemsr <jakemsr@openbsd.org>2010-10-23 16:14:06 +0000
committerjakemsr <jakemsr@openbsd.org>2010-10-23 16:14:06 +0000
commitc7438bdd78c4b7327ff5d3bff7386fef96a2edcd (patch)
treec00fedacf2d1eba777061f314d9e850960c3a3e3 /sys/dev/usb/if_uath.c
parent.Sm no longer produces a linebreak when used in .Bd (diff)
downloadwireguard-openbsd-c7438bdd78c4b7327ff5d3bff7386fef96a2edcd.tar.xz
wireguard-openbsd-c7438bdd78c4b7327ff5d3bff7386fef96a2edcd.zip
check that a timeout(9) has been initialized before deleting it
ok phessler
Diffstat (limited to 'sys/dev/usb/if_uath.c')
-rw-r--r--sys/dev/usb/if_uath.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/usb/if_uath.c b/sys/dev/usb/if_uath.c
index 4fe2392ff16..fdfeca5dd18 100644
--- a/sys/dev/usb/if_uath.c
+++ b/sys/dev/usb/if_uath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_uath.c,v 1.44 2010/10/23 15:42:09 jakemsr Exp $ */
+/* $OpenBSD: if_uath.c,v 1.45 2010/10/23 16:14:07 jakemsr Exp $ */
/*-
* Copyright (c) 2006
@@ -447,8 +447,10 @@ uath_detach(struct device *self, int flags)
/* post-firmware device */
usb_rem_task(sc->sc_udev, &sc->sc_task);
- timeout_del(&sc->scan_to);
- timeout_del(&sc->stat_to);
+ if (timeout_initialized(&sc->scan_to))
+ timeout_del(&sc->scan_to);
+ if (timeout_initialized(&sc->stat_to))
+ timeout_del(&sc->stat_to);
/* abort and free xfers */
uath_free_tx_data_list(sc);