diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2017-03-19 16:26:29 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2017-03-19 16:26:29 +0000 |
commit | 80216302e87e56af0cda380e22f2cefedb271397 (patch) | |
tree | d0c9c806ab13e9c59f02bafe15df5af6f0e04d39 /sys | |
parent | 745c9155066e4e8402f58d115619346c9012f383 (diff) |
Fixup return values to properly handle transfer submission errors
From Nathanael Rensen, thanks!
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pv/xbf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pv/xbf.c b/sys/dev/pv/xbf.c index bedea7ab37d..cd15d64923b 100644 --- a/sys/dev/pv/xbf.c +++ b/sys/dev/pv/xbf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xbf.c,v 1.26 2017/03/13 01:10:03 mikeb Exp $ */ +/* $OpenBSD: xbf.c,v 1.27 2017/03/19 16:26:28 mikeb Exp $ */ /* * Copyright (c) 2016 Mike Belopuhov @@ -469,7 +469,7 @@ xbf_load_xs(struct scsi_xfer *xs, int desc) if (error) { DPRINTF("%s: failed to load %d bytes of data\n", sc->sc_dev.dv_xname, xs->datalen); - return (-1); + return (error); } for (i = 0; i < map->dm_nsegs; i++) { @@ -652,7 +652,7 @@ xbf_submit_cmd(struct scsi_xfer *xs) else error = xbf_bounce_xs(xs, desc); if (error) - return (error); + return (-1); } else { DPRINTF("%s: desc %d %s%s lba %llu\n", sc->sc_dev.dv_xname, desc, operation == XBF_OP_FLUSH ? "flush" : "barrier", @@ -675,7 +675,7 @@ xbf_submit_cmd(struct scsi_xfer *xs) xen_intr_signal(sc->sc_xih); - return desc; + return (desc); } int |