From: krw Date: Wed, 7 Feb 2018 06:19:54 +0000 (+0000) Subject: Use M_WAITOK to show we don't need to check for NULL. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c6a0181911ffae8f85557b87f77c12375ce30e68;p=openbsd Use M_WAITOK to show we don't need to check for NULL. ok deraadt@ --- diff --git a/sys/arch/amd64/amd64/mpbios.c b/sys/arch/amd64/amd64/mpbios.c index 29fc18cfa2a..abbe1f3939b 100644 --- a/sys/arch/amd64/amd64/mpbios.c +++ b/sys/arch/amd64/amd64/mpbios.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpbios.c,v 1.28 2017/10/14 04:44:43 jsg Exp $ */ +/* $OpenBSD: mpbios.c,v 1.29 2018/02/07 06:19:54 krw Exp $ */ /* $NetBSD: mpbios.c,v 1.7 2003/05/15 16:32:50 fvdl Exp $ */ /*- @@ -556,9 +556,9 @@ mpbios_scan(struct device *self) } mp_busses = mallocarray(mp_nbusses, sizeof(struct mp_bus), - M_DEVBUF, M_NOWAIT|M_ZERO); + M_DEVBUF, M_WAITOK|M_ZERO); mp_intrs = mallocarray(intr_cnt, sizeof(struct mp_intr_map), - M_DEVBUF, M_NOWAIT); + M_DEVBUF, M_WAITOK); /* re-walk the table, recording info of interest */ position = (const u_int8_t *)mp_cth + sizeof(*mp_cth); diff --git a/sys/arch/i386/i386/mpbios.c b/sys/arch/i386/i386/mpbios.c index 75019e2c31d..4dfd3bd9bf2 100644 --- a/sys/arch/i386/i386/mpbios.c +++ b/sys/arch/i386/i386/mpbios.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpbios.c,v 1.40 2016/07/28 21:57:56 kettenis Exp $ */ +/* $OpenBSD: mpbios.c,v 1.41 2018/02/07 06:19:54 krw Exp $ */ /* $NetBSD: mpbios.c,v 1.2 2002/10/01 12:56:57 fvdl Exp $ */ /*- @@ -597,9 +597,9 @@ mpbios_scan(struct device *self) } mp_busses = mallocarray(mp_nbusses, sizeof(struct mp_bus), - M_DEVBUF, M_NOWAIT|M_ZERO); + M_DEVBUF, M_WAITOK|M_ZERO); mp_intrs = mallocarray(intr_cnt, sizeof(struct mp_intr_map), - M_DEVBUF, M_NOWAIT); + M_DEVBUF, M_WAITOK); /* re-walk the table, recording info of interest */ position = (const u_int8_t *)mp_cth + sizeof(*mp_cth);