summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2016-08-06 18:18:48 +0000
committerpatrick <patrick@openbsd.org>2016-08-06 18:18:48 +0000
commitc88bb1b8f9f91e8b2ea3802f22d268ca6ce5368c (patch)
tree868166f3b614122ad9fab9894e45a314e19ea2e8 /sys
parentImplement interrupt controller functionality in the i.MX6 GPIO (diff)
downloadwireguard-openbsd-c88bb1b8f9f91e8b2ea3802f22d268ca6ce5368c.tar.xz
wireguard-openbsd-c88bb1b8f9f91e8b2ea3802f22d268ca6ce5368c.zip
Always allocate intrhand with M_WAITOK.
Requested by and ok kettenis@
Diffstat (limited to 'sys')
-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;