svn commit: r261084 - head/sys/geom

Andrey V. Elsukov ae at FreeBSD.org
Thu Jan 23 19:07:23 UTC 2014


Author: ae
Date: Thu Jan 23 19:07:22 2014
New Revision: 261084
URL: http://svnweb.freebsd.org/changeset/base/261084

Log:
  malloc() with M_WAITOK doesn't return NULL.
  
  MFC after:	1 week

Modified:
  head/sys/geom/geom_ctl.c

Modified: head/sys/geom/geom_ctl.c
==============================================================================
--- head/sys/geom/geom_ctl.c	Thu Jan 23 18:09:10 2014	(r261083)
+++ head/sys/geom/geom_ctl.c	Thu Jan 23 19:07:22 2014	(r261084)
@@ -122,10 +122,7 @@ geom_alloc_copyin(struct gctl_req *req, 
 	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)


More information about the svn-src-head mailing list