summaryrefslogtreecommitdiff
path: root/sys/arch/armv7/sunxi
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2016-08-06 18:21:35 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2016-08-06 18:21:35 +0000
commit0253ed4b5cf63d8de0c6397aa5cf8592f3192e34 (patch)
tree73a213576b1b77a84c2bd7d8a4c6a127b8a8d967 /sys/arch/armv7/sunxi
parentc189f7b4468b9c48e187d065272bd503a582d0fd (diff)
Always allocate intrhand with M_WAITOK.
Requested by and ok kettenis@
Diffstat (limited to 'sys/arch/armv7/sunxi')
-rw-r--r--sys/arch/armv7/sunxi/sxiintc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/arch/armv7/sunxi/sxiintc.c b/sys/arch/armv7/sunxi/sxiintc.c
index 452361ecd76..e593997afc1 100644
--- a/sys/arch/armv7/sunxi/sxiintc.c
+++ b/sys/arch/armv7/sunxi/sxiintc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sxiintc.c,v 1.1 2016/08/05 20:38:17 kettenis Exp $ */
+/* $OpenBSD: sxiintc.c,v 1.2 2016/08/06 18:21:34 patrick Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
* Copyright (c) 2013 Artturi Alm
@@ -388,11 +388,7 @@ sxiintc_intr_establish(int irq, int level, int (*func)(void *),
psw = disable_interrupts(PSR_I);
- /* 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\n");
+ ih = malloc(sizeof(*ih), M_DEVBUF, M_WAITOK);
ih->ih_func = func;
ih->ih_arg = arg;
ih->ih_ipl = level;