summaryrefslogtreecommitdiffstats
path: root/sys/dev/xen/blkfront
diff options
context:
space:
mode:
authorcperciva <cperciva@FreeBSD.org>2015-06-21 05:32:56 +0000
committercperciva <cperciva@FreeBSD.org>2015-06-21 05:32:56 +0000
commitc7a15c0b1c36fc0fe5b90bcc6ec1de70dc592d3d (patch)
treebe74f31494910baee2ba5107ae6fb7052cb3bcac /sys/dev/xen/blkfront
parent9d1d13b2d484ce8d1fc8ad45f05d401fe5bec4d3 (diff)
downloadFreeBSD-src-c7a15c0b1c36fc0fe5b90bcc6ec1de70dc592d3d.zip
FreeBSD-src-c7a15c0b1c36fc0fe5b90bcc6ec1de70dc592d3d.tar.gz
If we fail to allocate memory, pass ENOMEM as the error code, not the
"error" variable (which is always zero at this point).
Diffstat (limited to 'sys/dev/xen/blkfront')
-rw-r--r--sys/dev/xen/blkfront/blkfront.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/xen/blkfront/blkfront.c b/sys/dev/xen/blkfront/blkfront.c
index 3991f96..edaaf96 100644
--- a/sys/dev/xen/blkfront/blkfront.c
+++ b/sys/dev/xen/blkfront/blkfront.c
@@ -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;
}
OpenPOWER on IntegriCloud