summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2007-12-09 00:08:35 +0000
committerderaadt <deraadt@openbsd.org>2007-12-09 00:08:35 +0000
commitee759f728f41989ca1392f255f979be06ac35fde (patch)
tree7f65c59eb806be114b0846c0e496d06632c7217a
parentRename everything which reffered to services refer to rdr for internals (diff)
downloadwireguard-openbsd-ee759f728f41989ca1392f255f979be06ac35fde.tar.xz
wireguard-openbsd-ee759f728f41989ca1392f255f979be06ac35fde.zip
in raldetach, do not call chip-specific detach if it was never called in
the first place (ie. if interrupt allocation failed)
-rw-r--r--sys/dev/pci/if_ral_pci.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/pci/if_ral_pci.c b/sys/dev/pci/if_ral_pci.c
index 370f05763e7..c428f52c29d 100644
--- a/sys/dev/pci/if_ral_pci.c
+++ b/sys/dev/pci/if_ral_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ral_pci.c,v 1.11 2007/12/04 22:26:54 deraadt Exp $ */
+/* $OpenBSD: if_ral_pci.c,v 1.12 2007/12/09 00:08:35 deraadt Exp $ */
/*-
* Copyright (c) 2005-2007
@@ -188,11 +188,11 @@ ral_pci_detach(struct device *self, int flags)
struct rt2560_softc *sc = &psc->sc_sc;
int error;
- error = (*psc->sc_opns->detach)(sc);
- if (error != 0)
- return error;
-
if (psc->sc_ih != NULL) {
+ error = (*psc->sc_opns->detach)(sc);
+ if (error != 0)
+ return error;
+
pci_intr_disestablish(psc->sc_pc, psc->sc_ih);
psc->sc_ih = NULL;
}