diff options
author | 2012-10-10 08:22:38 +0000 | |
---|---|---|
committer | 2012-10-10 08:22:38 +0000 | |
commit | c30277e2d1c2a2ea46f11bfab8eeafdd919bcaa1 (patch) | |
tree | 2bd40651fb4766de886086e4fda52800740e2375 | |
parent | a little better DESCRIPTION; (diff) | |
download | wireguard-openbsd-c30277e2d1c2a2ea46f11bfab8eeafdd919bcaa1.tar.xz wireguard-openbsd-c30277e2d1c2a2ea46f11bfab8eeafdd919bcaa1.zip |
Avoid potential uninitialized variable access in fxp driver.
Found by haesbaert@.
ok haesbaert@ deraadt@
-rw-r--r-- | sys/dev/ic/fxp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c index 91d58496d91..54234b5b862 100644 --- a/sys/dev/ic/fxp.c +++ b/sys/dev/ic/fxp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fxp.c,v 1.110 2012/04/03 23:39:09 deraadt Exp $ */ +/* $OpenBSD: fxp.c,v 1.111 2012/10/10 08:22:38 blambert Exp $ */ /* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */ /* @@ -1837,9 +1837,6 @@ fxp_load_ucode(struct fxp_softc *sc) struct fxp_cb_ucode *cbp = &sc->sc_ctrl->u.code; int i, error; - if (sc->sc_ucodebuf) - goto reloadit; - if (sc->sc_flags & FXPF_NOUCODE) return; @@ -1851,6 +1848,9 @@ fxp_load_ucode(struct fxp_softc *sc) return; /* no ucode for this chip is found */ } + if (sc->sc_ucodebuf) + goto reloadit; + if (sc->sc_revision == FXP_REV_82550_C) { u_int16_t data; |