If we fail to allocate memory, pass ENOMEM as the error code, not the
"error" variable (which is always zero at this point).
This commit is contained in:
parent
798e3ec502
commit
0115209538
@ -1135,7 +1135,7 @@ xbd_initialize(struct xbd_softc *sc)
|
|||||||
M_XENBLOCKFRONT, M_NOWAIT|M_ZERO);
|
M_XENBLOCKFRONT, M_NOWAIT|M_ZERO);
|
||||||
if (sc->xbd_shadow == NULL) {
|
if (sc->xbd_shadow == NULL) {
|
||||||
bus_dma_tag_destroy(sc->xbd_io_dmat);
|
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");
|
"Cannot allocate request structures\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user