malloc() with M_WAITOK doesn't return NULL.

MFC after:	1 week
This commit is contained in:
Andrey V. Elsukov 2014-01-23 19:07:22 +00:00
parent df10106a87
commit ee839ce84c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=261084

View file

@ -122,10 +122,7 @@ geom_alloc_copyin(struct gctl_req *req, void *uaddr, size_t len)
void *ptr;
ptr = g_malloc(len, M_WAITOK);
if (ptr == NULL)
req->nerror = ENOMEM;
else
req->nerror = copyin(uaddr, ptr, len);
nreq->nerror = copyin(uaddr, ptr, len);
if (!req->nerror)
return (ptr);
if (ptr != NULL)