From bf6fe86349b93e744812bf7fb31f4c14ff60da70 Mon Sep 17 00:00:00 2001 From: Damien Bergamini Date: Sun, 1 Nov 2009 12:08:37 +0000 Subject: call powerhook_disestablish() and pci_intr_disestablish() earlier. diff from deraadt@ --- sys/dev/pci/if_ral_pci.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sys/dev/pci') diff --git a/sys/dev/pci/if_ral_pci.c b/sys/dev/pci/if_ral_pci.c index 561e924697f..bef3a3ab987 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.17 2009/05/12 17:43:16 damien Exp $ */ +/* $OpenBSD: if_ral_pci.c,v 1.18 2009/11/01 12:08:36 damien Exp $ */ /*- * Copyright (c) 2005-2007 @@ -201,12 +201,11 @@ ral_pci_detach(struct device *self, int flags) int error; if (psc->sc_ih != NULL) { + pci_intr_disestablish(psc->sc_pc, psc->sc_ih); + error = (*psc->sc_opns->detach)(sc); if (error != 0) return error; - - pci_intr_disestablish(psc->sc_pc, psc->sc_ih); - psc->sc_ih = NULL; } if (psc->sc_mapsize > 0) -- cgit v1.2.3