diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-11-29 10:22:31 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-11-29 10:22:31 +0000 |
commit | 60d63461a21e4ba80eae9df4eb31ca666d333c55 (patch) | |
tree | e549fe3dcf07e8dea66ffd4bf09219dedb2508fc /sys/dev/pci/if_alc.c | |
parent | 2dca8b0475a26898be84df58346e417077abf80f (diff) |
m_free() and m_freem() test for NULL. Simplify callers which had their own
NULL tests.
ok mpi@
Diffstat (limited to 'sys/dev/pci/if_alc.c')
-rw-r--r-- | sys/dev/pci/if_alc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/pci/if_alc.c b/sys/dev/pci/if_alc.c index 5040f247c8e..67a47b9c018 100644 --- a/sys/dev/pci/if_alc.c +++ b/sys/dev/pci/if_alc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_alc.c,v 1.39 2016/04/13 10:34:32 mpi Exp $ */ +/* $OpenBSD: if_alc.c,v 1.40 2016/11/29 10:22:30 jsg Exp $ */ /*- * Copyright (c) 2009, Pyun YongHyeon <yongari@FreeBSD.org> * All rights reserved. @@ -1912,8 +1912,7 @@ alc_rxeof(struct alc_softc *sc, struct rx_rdesc *rrd) if (alc_newbuf(sc, rxd) != 0) { ifp->if_iqdrops++; /* Reuse Rx buffers. */ - if (sc->alc_cdata.alc_rxhead != NULL) - m_freem(sc->alc_cdata.alc_rxhead); + m_freem(sc->alc_cdata.alc_rxhead); break; } @@ -2377,8 +2376,7 @@ alc_stop(struct alc_softc *sc) CSR_WRITE_4(sc, ALC_INTR_STATUS, 0xFFFFFFFF); /* Reclaim Rx buffers that have been processed. */ - if (sc->alc_cdata.alc_rxhead != NULL) - m_freem(sc->alc_cdata.alc_rxhead); + m_freem(sc->alc_cdata.alc_rxhead); ALC_RXCHAIN_RESET(sc); /* * Free Tx/Rx mbufs still in the queues. |