diff options
author | 2001-05-16 12:48:31 +0000 | |
---|---|---|
committer | 2001-05-16 12:48:31 +0000 | |
commit | d424e204e60bfd7ffd01a57d3983f326a20fef28 (patch) | |
tree | 49e17bdb4138ce9da9ed97cdb6b57b088efe1497 /sys/arch/sun3/dev/eeprom.c | |
parent | document SMALL_KERNEL. (diff) | |
download | wireguard-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/dev/eeprom.c')
-rw-r--r-- | sys/arch/sun3/dev/eeprom.c | 9 |
1 files changed, 2 insertions, 7 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) |