summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2016-08-06 18:18:49 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2016-08-06 18:18:49 +0000
commitc189f7b4468b9c48e187d065272bd503a582d0fd (patch)
tree6b8cef50bd1db044b262d49f90e50e35347ac120 /sys/arch
parent74dff9e863cc35ed7154a9f3e9764fe618b482cd (diff)
Always allocate intrhand with M_WAITOK.
Requested by and ok kettenis@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/arm/cortex/ampintc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/arch/arm/cortex/ampintc.c b/sys/arch/arm/cortex/ampintc.c
index 892e67f64c4..edcbc6d1051 100644
--- a/sys/arch/arm/cortex/ampintc.c
+++ b/sys/arch/arm/cortex/ampintc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ampintc.c,v 1.12 2016/08/06 17:25:14 patrick Exp $ */
+/* $OpenBSD: ampintc.c,v 1.13 2016/08/06 18:18:48 patrick Exp $ */
/*
* Copyright (c) 2007,2009,2011 Dale Rahn <drahn@openbsd.org>
*
@@ -553,11 +553,7 @@ ampintc_intr_establish(int irqno, int level, int (*func)(void *),
panic("ampintc_intr_establish: bogus irqnumber %d: %s",
irqno, name);
- /* no point in sleeping unless someone can free memory. */
- ih = (struct intrhand *)malloc (sizeof *ih, M_DEVBUF,
- cold ? M_NOWAIT : M_WAITOK);
- if (ih == NULL)
- panic("intr_establish: can't malloc handler info");
+ ih = malloc(sizeof(*ih), M_DEVBUF, M_WAITOK);
ih->ih_func = func;
ih->ih_arg = arg;
ih->ih_ipl = level;