diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2010-10-23 16:14:08 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2010-10-23 16:14:08 +0000 |
commit | db9058be5229697001a5d46f83b0dd4ab66a8695 (patch) | |
tree | 9eea560f87590a129aa562cec2d2b6040ae93079 /sys/dev/usb/if_zyd.c | |
parent | bdc249af6535dd1a757df6cdbe97fbd299400ed4 (diff) |
check that a timeout(9) has been initialized before deleting it
ok phessler
Diffstat (limited to 'sys/dev/usb/if_zyd.c')
-rw-r--r-- | sys/dev/usb/if_zyd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/usb/if_zyd.c b/sys/dev/usb/if_zyd.c index ca1cdc28939..c1066de374b 100644 --- a/sys/dev/usb/if_zyd.c +++ b/sys/dev/usb/if_zyd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_zyd.c,v 1.83 2010/10/23 15:42:09 jakemsr Exp $ */ +/* $OpenBSD: if_zyd.c,v 1.84 2010/10/23 16:14:07 jakemsr Exp $ */ /*- * Copyright (c) 2006 by Damien Bergamini <damien.bergamini@free.fr> @@ -443,8 +443,10 @@ zyd_detach(struct device *self, int flags) s = splusb(); usb_rem_task(sc->sc_udev, &sc->sc_task); - timeout_del(&sc->scan_to); - timeout_del(&sc->amrr_to); + if (timeout_initialized(&sc->scan_to)) + timeout_del(&sc->scan_to); + if (timeout_initialized(&sc->amrr_to)) + timeout_del(&sc->amrr_to); zyd_close_pipes(sc); |