Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Fix the "typical usage" example for enqueuing a ...



details:   https://anonhg.NetBSD.org/src/rev/0cf6fa5b2bb9
branches:  trunk
changeset: 349207:0cf6fa5b2bb9
user:      uwe <uwe%NetBSD.org@localhost>
date:      Tue Nov 29 22:04:42 2016 +0000

description:
Fix the "typical usage" example for enqueuing a request - if
bus_dmamap_load(9) fails, we shouldn't call bus_dmamap_unload(9).

diffstat:

 sys/dev/pci/virtio.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r ccdf7c7616eb -r 0cf6fa5b2bb9 sys/dev/pci/virtio.c
--- a/sys/dev/pci/virtio.c      Tue Nov 29 21:58:13 2016 +0000
+++ b/sys/dev/pci/virtio.c      Tue Nov 29 22:04:42 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: virtio.c,v 1.18 2016/09/27 03:33:32 pgoyette Exp $     */
+/*     $NetBSD: virtio.c,v 1.19 2016/11/29 22:04:42 uwe Exp $  */
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.18 2016/09/27 03:33:32 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.19 2016/11/29 22:04:42 uwe Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1018,7 +1018,6 @@
  *     r = bus_dmamap_load(dmat, dmamap_payload[slot], data, count, ..);
  *     if (r) {
  *       virtio_enqueue_abort(sc, vq, slot);
- *       bus_dmamap_unload(dmat, dmamap_payload[slot]);
  *       return r;
  *     }
  *     r = virtio_enqueue_reserve(sc, vq, slot, 



Home | Main Index | Thread Index | Old Index