diff options
author | Bret Lambert <blambert@cvs.openbsd.org> | 2012-10-10 08:22:39 +0000 |
---|---|---|
committer | Bret Lambert <blambert@cvs.openbsd.org> | 2012-10-10 08:22:39 +0000 |
commit | 6ea51f94a9bc8f339c1afa370069ce3c067ad6be (patch) | |
tree | ace18f7a791319cb4d90d520f192ddafeac8ee6f /sys/dev/ic/fxp.c | |
parent | 5c47b5afcf8fa51b94c18c32448b680a3ff7f72d (diff) |
Avoid potential uninitialized variable access in fxp driver.
Found by haesbaert@.
ok haesbaert@ deraadt@
Diffstat (limited to 'sys/dev/ic/fxp.c')
-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; |