summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorkevlo <kevlo@FreeBSD.org>2007-12-17 05:08:54 +0000
committerkevlo <kevlo@FreeBSD.org>2007-12-17 05:08:54 +0000
commitf3f1d0b3a58a334b944a9ca62dac1948a4392ce3 (patch)
treec1c43ea8ba72da8d2481a5d3162cb414e5885a39 /sys
parent139d7c3fb10ebc149150f89c9ad8ae77b08265a8 (diff)
downloadFreeBSD-src-f3f1d0b3a58a334b944a9ca62dac1948a4392ce3.zip
FreeBSD-src-f3f1d0b3a58a334b944a9ca62dac1948a4392ce3.tar.gz
Use M_NOWAIT instead of M_WAITOK to cause malloc() to return NULL
Reviewed by: imp
Diffstat (limited to 'sys')
-rw-r--r--sys/arm/at91/at91.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/arm/at91/at91.c b/sys/arm/at91/at91.c
index 0f6a8d5..c37a0eb 100644
--- a/sys/arm/at91/at91.c
+++ b/sys/arm/at91/at91.c
@@ -209,7 +209,7 @@ at91_add_child(device_t dev, int prio, const char *name, int unit,
printf("Can't add child %s%d ordered\n", name, unit);
return;
}
- ivar = malloc(sizeof(*ivar), M_DEVBUF, M_WAITOK | M_ZERO);
+ ivar = malloc(sizeof(*ivar), M_DEVBUF, M_NOWAIT | M_ZERO);
if (ivar == NULL) {
device_delete_child(dev, kid);
printf("Can't add alloc ivar\n");
OpenPOWER on IntegriCloud