summaryrefslogtreecommitdiffstats
path: root/sys/arch/sun3
diff options
context:
space:
mode:
authorho <ho@openbsd.org>2001-05-16 12:48:31 +0000
committerho <ho@openbsd.org>2001-05-16 12:48:31 +0000
commitd424e204e60bfd7ffd01a57d3983f326a20fef28 (patch)
tree49e17bdb4138ce9da9ed97cdb6b57b088efe1497 /sys/arch/sun3
parentdocument SMALL_KERNEL. (diff)
downloadwireguard-openbsd-d424e204e60bfd7ffd01a57d3983f326a20fef28.tar.xz
wireguard-openbsd-d424e204e60bfd7ffd01a57d3983f326a20fef28.zip
No need to check M_WAIT/M_WAITOK malloc return values. (art@ ok)
Diffstat (limited to 'sys/arch/sun3')
-rw-r--r--sys/arch/sun3/dev/eeprom.c9
-rw-r--r--sys/arch/sun3/dev/si.c4
2 files changed, 3 insertions, 10 deletions
diff --git a/sys/arch/sun3/dev/eeprom.c b/sys/arch/sun3/dev/eeprom.c
index d4e36dff344..61672907da6 100644
--- a/sys/arch/sun3/dev/eeprom.c
+++ b/sys/arch/sun3/dev/eeprom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eeprom.c,v 1.7 2001/01/04 22:34:42 miod Exp $ */
+/* $OpenBSD: eeprom.c,v 1.8 2001/05/16 12:49:48 ho Exp $ */
/* $NetBSD: eeprom.c,v 1.8 1996/03/26 15:16:06 gwr Exp $ */
/*
@@ -175,12 +175,7 @@ eeprom_uio(uio)
va = eeprom_va;
if (uio->uio_rw != UIO_READ) {
/* Write requires a temporary buffer. */
- buf = malloc(OBIO_EEPROM_SIZE, M_DEVBUF, M_WAITOK);
- if (!buf) {
- error = EAGAIN;
- goto out;
- }
- va = buf;
+ va = buf = malloc(OBIO_EEPROM_SIZE, M_DEVBUF, M_WAITOK);
}
if ((error = uiomove(va + off, (int)cnt, uio)) != 0)
diff --git a/sys/arch/sun3/dev/si.c b/sys/arch/sun3/dev/si.c
index 5c573989874..917e3167cd2 100644
--- a/sys/arch/sun3/dev/si.c
+++ b/sys/arch/sun3/dev/si.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: si.c,v 1.13 2000/09/21 21:25:16 miod Exp $ */
+/* $OpenBSD: si.c,v 1.14 2001/05/16 12:49:49 ho Exp $ */
/* $NetBSD: si.c,v 1.31 1996/11/20 18:56:59 gwr Exp $ */
/*-
@@ -203,8 +203,6 @@ si_attach(sc)
i = SCI_OPENINGS * sizeof(struct si_dma_handle);
sc->sc_dma = (struct si_dma_handle *)
malloc(i, M_DEVBUF, M_WAITOK);
- if (sc->sc_dma == NULL)
- panic("si: dvma_malloc failed");
for (i = 0; i < SCI_OPENINGS; i++)
sc->sc_dma[i].dh_flags = 0;