summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-12-09 00:08:36 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-12-09 00:08:36 +0000
commit34eb0ddbad492ef0e8dd8791e244f73510a6e04c (patch)
treeb0793feff44dc59a73fac5a2e916b4c4b896fd10 /sys/dev/pci
parentc1f6beb8faeaace32b59af6d9b0955316f243bdb (diff)
in raldetach, do not call chip-specific detach if it was never called in
the first place (ie. if interrupt allocation failed)
Diffstat (limited to 'sys/dev/pci')
-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;
}