-/* $OpenBSD: aplpinctrl.c,v 1.6 2023/03/05 14:45:07 patrick Exp $ */
+/* $OpenBSD: aplpinctrl.c,v 1.7 2023/03/23 11:40:42 jsg Exp $ */
/*
* Copyright (c) 2021 Mark Kettenis <kettenis@openbsd.org>
*
TAILQ_REMOVE(&sc->sc_handler[ih->ih_irq], ih, ih_list);
if (ih->ih_name)
evcount_detach(&ih->ih_count);
- free(ih, M_DEVBUF, sizeof(*ih));
if (TAILQ_EMPTY(&sc->sc_handler[ih->ih_irq])) {
reg = HREAD4(sc, GPIO_PIN(ih->ih_irq));
HWRITE4(sc, GPIO_PIN(ih->ih_irq), reg);
}
+ free(ih, M_DEVBUF, sizeof(*ih));
+
splx(s);
}