diff --git a/sys/dev/iwm/if_iwm.c b/sys/dev/iwm/if_iwm.c index d80b22cf9dec..9bbf292bb74d 100644 --- a/sys/dev/iwm/if_iwm.c +++ b/sys/dev/iwm/if_iwm.c @@ -1033,7 +1033,8 @@ iwm_reset_rx_ring(struct iwm_softc *sc, struct iwm_rx_ring *ring) * The hw rx ring index in shared memory must also be cleared, * otherwise the discrepancy can cause reprocessing chaos. */ - memset(sc->rxq.stat, 0, sizeof(*sc->rxq.stat)); + if (sc->rxq.stat) + memset(sc->rxq.stat, 0, sizeof(*sc->rxq.stat)); } static void