Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Mar 2018 06:29:02 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r330197 - stable/11/sys/dev/iwm
Message-ID:  <201803010629.w216T2FX053223@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eadler
Date: Thu Mar  1 06:29:02 2018
New Revision: 330197
URL: https://svnweb.freebsd.org/changeset/base/330197

Log:
  MFC r315923:
  
  [iwm]  Tiny cleanup in iwm_rx_addbuf().

Modified:
  stable/11/sys/dev/iwm/if_iwm.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/iwm/if_iwm.c
==============================================================================
--- stable/11/sys/dev/iwm/if_iwm.c	Thu Mar  1 06:27:39 2018	(r330196)
+++ stable/11/sys/dev/iwm/if_iwm.c	Thu Mar  1 06:29:02 2018	(r330197)
@@ -3032,7 +3032,7 @@ iwm_rx_addbuf(struct iwm_softc *sc, int size, int idx)
 	struct iwm_rx_ring *ring = &sc->rxq;
 	struct iwm_rx_data *data = &ring->data[idx];
 	struct mbuf *m;
-	bus_dmamap_t dmamap = NULL;
+	bus_dmamap_t dmamap;
 	bus_dma_segment_t seg;
 	int nsegs, error;
 
@@ -3046,7 +3046,8 @@ iwm_rx_addbuf(struct iwm_softc *sc, int size, int idx)
 	if (error != 0) {
 		device_printf(sc->sc_dev,
 		    "%s: can't map mbuf, error %d\n", __func__, error);
-		goto fail;
+		m_freem(m);
+		return error;
 	}
 
 	if (data->m != NULL)
@@ -3067,9 +3068,6 @@ iwm_rx_addbuf(struct iwm_softc *sc, int size, int idx)
 	    BUS_DMASYNC_PREWRITE);
 
 	return 0;
-fail:
-	m_freem(m);
-	return error;
 }
 
 /* iwlwifi: mvm/rx.c */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803010629.w216T2FX053223>