called with M_WAITOK.
OK kevlo@
-/* $OpenBSD: if_igc.c,v 1.12 2023/03/09 00:13:47 chris Exp $ */
+/* $OpenBSD: if_igc.c,v 1.13 2023/04/28 10:18:57 bluhm Exp $ */
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
struct rx_ring *rxr;
int error, i, n = 0;
- if ((ifr = mallocarray(sc->sc_nqueues, sizeof(*ifr), M_DEVBUF,
- M_WAITOK | M_ZERO)) == NULL)
- return ENOMEM;
+ ifr = mallocarray(sc->sc_nqueues, sizeof(*ifr), M_DEVBUF,
+ M_WAITOK | M_ZERO);
for (i = 0; i < sc->sc_nqueues; i++) {
rxr = &sc->rx_rings[i];
-/* $OpenBSD: if_ix.c,v 1.192 2023/02/06 20:27:44 jan Exp $ */
+/* $OpenBSD: if_ix.c,v 1.193 2023/04/28 10:18:57 bluhm Exp $ */
/******************************************************************************
u_int n = 0;
if (sc->num_queues > 1) {
- if ((ifr = mallocarray(sc->num_queues, sizeof(*ifr), M_DEVBUF,
- M_WAITOK | M_ZERO)) == NULL)
- return (ENOMEM);
+ ifr = mallocarray(sc->num_queues, sizeof(*ifr), M_DEVBUF,
+ M_WAITOK | M_ZERO);
} else
ifr = &ifr1;
-/* $OpenBSD: if_oce.c,v 1.106 2022/03/11 18:00:48 mpi Exp $ */
+/* $OpenBSD: if_oce.c,v 1.107 2023/04/28 10:18:58 bluhm Exp $ */
/*
* Copyright (c) 2012 Mike Belopuhov
u_int n = 0;
if (sc->sc_nrq > 1) {
- if ((ifr = mallocarray(sc->sc_nrq, sizeof(*ifr), M_DEVBUF,
- M_WAITOK | M_ZERO)) == NULL)
- return (ENOMEM);
+ ifr = mallocarray(sc->sc_nrq, sizeof(*ifr), M_DEVBUF,
+ M_WAITOK | M_ZERO);
} else
ifr = &ifr1;