Module Name:    src
Committed By:   martin
Date:           Thu Oct 24 13:15:12 UTC 2013

Modified Files:
        src/sys/dev/ic: sgec.c

Log Message:
Fix a few copy&pastos in an error path


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/dev/ic/sgec.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ic/sgec.c
diff -u src/sys/dev/ic/sgec.c:1.39 src/sys/dev/ic/sgec.c:1.40
--- src/sys/dev/ic/sgec.c:1.39	Sat Nov 13 13:52:02 2010
+++ src/sys/dev/ic/sgec.c	Thu Oct 24 13:15:12 2013
@@ -1,4 +1,4 @@
-/*      $NetBSD: sgec.c,v 1.39 2010/11/13 13:52:02 uebayasi Exp $ */
+/*      $NetBSD: sgec.c,v 1.40 2013/10/24 13:15:12 martin Exp $ */
 /*
  * Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
  *
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sgec.c,v 1.39 2010/11/13 13:52:02 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sgec.c,v 1.40 2013/10/24 13:15:12 martin Exp $");
 
 #include "opt_inet.h"
 
@@ -241,17 +241,17 @@ sgec_attach(struct ze_softc *sc)
  fail_6:
 	for (i = 0; i < RXDESCS; i++) {
 		if (sc->sc_rxmbuf[i] != NULL) {
-			bus_dmamap_unload(sc->sc_dmat, sc->sc_xmtmap[i]);
+			bus_dmamap_unload(sc->sc_dmat, sc->sc_rcvmap[i]);
 			m_freem(sc->sc_rxmbuf[i]);
 		}
 	}
  fail_5:
-	for (i = 0; i < RXDESCS; i++) {
+	for (i = 0; i < TXDESCS; i++) {
 		if (sc->sc_xmtmap[i] != NULL)
 			bus_dmamap_destroy(sc->sc_dmat, sc->sc_xmtmap[i]);
 	}
  fail_4:
-	for (i = 0; i < TXDESCS; i++) {
+	for (i = 0; i < RXDESCS; i++) {
 		if (sc->sc_rcvmap[i] != NULL)
 			bus_dmamap_destroy(sc->sc_dmat, sc->sc_rcvmap[i]);
 	}

Reply via email to