Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jun 2015 05:32:56 +0000 (UTC)
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r284662 - head/sys/dev/xen/blkfront
Message-ID:  <201506210532.t5L5WuRS019479@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cperciva
Date: Sun Jun 21 05:32:56 2015
New Revision: 284662
URL: https://svnweb.freebsd.org/changeset/base/284662

Log:
  If we fail to allocate memory, pass ENOMEM as the error code, not the
  "error" variable (which is always zero at this point).

Modified:
  head/sys/dev/xen/blkfront/blkfront.c

Modified: head/sys/dev/xen/blkfront/blkfront.c
==============================================================================
--- head/sys/dev/xen/blkfront/blkfront.c	Sun Jun 21 04:39:34 2015	(r284661)
+++ head/sys/dev/xen/blkfront/blkfront.c	Sun Jun 21 05:32:56 2015	(r284662)
@@ -1135,7 +1135,7 @@ xbd_initialize(struct xbd_softc *sc)
 	    M_XENBLOCKFRONT, M_NOWAIT|M_ZERO);
 	if (sc->xbd_shadow == NULL) {
 		bus_dma_tag_destroy(sc->xbd_io_dmat);
-		xenbus_dev_fatal(sc->xbd_dev, error,
+		xenbus_dev_fatal(sc->xbd_dev, ENOMEM,
 		    "Cannot allocate request structures\n");
 		return;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506210532.t5L5WuRS019479>