Use M_NOWAIT instead of M_WAITOK to cause malloc() to return NULL
Reviewed by: imp
This commit is contained in:
parent
58505389d1
commit
5497f4c53e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=174700
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user