From: stsp Date: Sun, 20 Jul 2014 11:57:05 +0000 (+0000) Subject: Make bwi_dma_mbuf_create() use the correct loop counter in error case. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5dac2140a25b63a8e4bd49332aa31dbb0155f60d;p=openbsd Make bwi_dma_mbuf_create() use the correct loop counter in error case. Bug inherited from DragonFly BSD. ok mpi@ as part of a larger diff. --- diff --git a/sys/dev/ic/bwi.c b/sys/dev/ic/bwi.c index 0313a759b0c..b83b1e830fc 100644 --- a/sys/dev/ic/bwi.c +++ b/sys/dev/ic/bwi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bwi.c,v 1.103 2014/07/20 11:56:15 stsp Exp $ */ +/* $OpenBSD: bwi.c,v 1.104 2014/07/20 11:57:05 stsp Exp $ */ /* * Copyright (c) 2007 The DragonFly Project. All rights reserved. @@ -7856,7 +7856,7 @@ bwi_dma_mbuf_create(struct bwi_softc *sc) for (k = 0; k < j; ++k) { bus_dmamap_destroy(sc->sc_dmat, - rbd->rbd_buf[j].rb_dmap); + rbd->rbd_buf[k].rb_dmap); } bus_dmamap_destroy(sc->sc_dmat, rbd->rbd_tmp_dmap);