iwm(4): Don't dereference potentially NULL pointer before NULL check

Introduced in r298594.  There is no path before the 'vap == NULL' check where
vap is not already dereferenced.

Reported by:	Coverity
CID:		1354979
Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Conrad Meyer 2016-04-26 19:06:28 +00:00
parent 7bb0da8d70
commit 2cb2bed294

View File

@ -4377,7 +4377,7 @@ iwm_intr(void *arg)
device_printf(sc->sc_dev,
" rx ring: cur=%d\n", sc->rxq.cur);
device_printf(sc->sc_dev,
" 802.11 state %d\n", vap->iv_state);
" 802.11 state %d\n", (vap == NULL) ? -1 : vap->iv_state);
/* Don't stop the device; just do a VAP restart */
IWM_UNLOCK(sc);