svn commit: r316806 - head/sys/dev/fxp
Pyun YongHyeon
yongari at FreeBSD.org
Fri Apr 14 02:33:27 UTC 2017
Author: yongari
Date: Fri Apr 14 02:33:26 2017
New Revision: 316806
URL: https://svnweb.freebsd.org/changeset/base/316806
Log:
Remove unnecessary comparison.
Found by: PVS-Studio
Modified:
head/sys/dev/fxp/if_fxp.c
Modified: head/sys/dev/fxp/if_fxp.c
==============================================================================
--- head/sys/dev/fxp/if_fxp.c Fri Apr 14 02:24:02 2017 (r316805)
+++ head/sys/dev/fxp/if_fxp.c Fri Apr 14 02:33:26 2017 (r316806)
@@ -2212,18 +2212,15 @@ fxp_stop(struct fxp_softc *sc)
* Release any xmit buffers.
*/
txp = sc->fxp_desc.tx_list;
- if (txp != NULL) {
- for (i = 0; i < FXP_NTXCB; i++) {
- if (txp[i].tx_mbuf != NULL) {
- bus_dmamap_sync(sc->fxp_txmtag, txp[i].tx_map,
- BUS_DMASYNC_POSTWRITE);
- bus_dmamap_unload(sc->fxp_txmtag,
- txp[i].tx_map);
- m_freem(txp[i].tx_mbuf);
- txp[i].tx_mbuf = NULL;
- /* clear this to reset csum offload bits */
- txp[i].tx_cb->tbd[0].tb_addr = 0;
- }
+ for (i = 0; i < FXP_NTXCB; i++) {
+ if (txp[i].tx_mbuf != NULL) {
+ bus_dmamap_sync(sc->fxp_txmtag, txp[i].tx_map,
+ BUS_DMASYNC_POSTWRITE);
+ bus_dmamap_unload(sc->fxp_txmtag, txp[i].tx_map);
+ m_freem(txp[i].tx_mbuf);
+ txp[i].tx_mbuf = NULL;
+ /* clear this to reset csum offload bits */
+ txp[i].tx_cb->tbd[0].tb_addr = 0;
}
}
bus_dmamap_sync(sc->cbl_tag, sc->cbl_map,
More information about the svn-src-all
mailing list