diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2013-05-27 21:19:32 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2013-05-27 21:19:32 +0000 |
commit | 50550df142341c7b10d54e844e7336bb689ad85d (patch) | |
tree | 50032508b68ba911282f534c5ea47823ae474138 /sys/dev | |
parent | e8acf00c224fc610ec668fd950ee5f85e3219f31 (diff) |
Fix edge cases of uninitialized variables. In my tree for too long, I even
got ok's for azalia but I don't remember from whom.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/siop.c | 7 | ||||
-rw-r--r-- | sys/dev/pci/azalia_codec.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/pciide.c | 3 |
3 files changed, 10 insertions, 4 deletions
diff --git a/sys/dev/ic/siop.c b/sys/dev/ic/siop.c index 9cf5af91da5..263db8e03af 100644 --- a/sys/dev/ic/siop.c +++ b/sys/dev/ic/siop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: siop.c,v 1.65 2011/06/23 16:31:16 deraadt Exp $ */ +/* $OpenBSD: siop.c,v 1.66 2013/05/27 21:19:31 miod Exp $ */ /* $NetBSD: siop.c,v 1.79 2005/11/18 23:10:32 bouyer Exp $ */ /* @@ -634,6 +634,8 @@ siop_intr(v) goto end; } need_reset = 1; + } else { + sist = sstat1 = 0; } if (need_reset) { reset: @@ -1049,7 +1051,8 @@ scintr: goto reset; } return 1; - } + } else + irqcode = 0; /* We can get here if ISTAT_DIP and DSTAT_DFE are the only bits set. */ /* But that *SHOULDN'T* happen. It does on powerpc (at least). */ printf("%s: siop_intr() - we should not be here!\n" diff --git a/sys/dev/pci/azalia_codec.c b/sys/dev/pci/azalia_codec.c index fe92289602f..546f615af20 100644 --- a/sys/dev/pci/azalia_codec.c +++ b/sys/dev/pci/azalia_codec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: azalia_codec.c,v 1.153 2013/05/24 10:52:13 jsg Exp $ */ +/* $OpenBSD: azalia_codec.c,v 1.154 2013/05/27 21:19:31 miod Exp $ */ /* $NetBSD: azalia_codec.c,v 1.8 2006/05/10 11:17:27 kent Exp $ */ /*- @@ -2299,6 +2299,7 @@ azalia_mixer_from_device_value(const codec_t *this, nid_t nid, int target, } else { DPRINTF(("%s: unknown target: %d\n", __func__, target)); steps = 255; + ctloff = 0; } dv -= ctloff; if (dv <= 0 || steps == 0) @@ -2325,6 +2326,7 @@ azalia_mixer_to_device_value(const codec_t *this, nid_t nid, int target, } else { DPRINTF(("%s: unknown target: %d\n", __func__, target)); steps = 255; + ctloff = 0; } if (uv <= AUDIO_MIN_GAIN || steps == 0) return(ctloff); diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c index cba8214238b..7bcce085b65 100644 --- a/sys/dev/pci/pciide.c +++ b/sys/dev/pci/pciide.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pciide.c,v 1.341 2013/01/05 08:27:48 jasper Exp $ */ +/* $OpenBSD: pciide.c,v 1.342 2013/05/27 21:19:31 miod Exp $ */ /* $NetBSD: pciide.c,v 1.127 2001/08/03 01:31:08 tsutsui Exp $ */ /* @@ -5980,6 +5980,7 @@ hpt_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa) } for (i = 0; i < sc->sc_wdcdev.nchannels; i++) { cp = &sc->pciide_channels[i]; + compatchan = 0; if (sc->sc_wdcdev.nchannels > 1) { compatchan = i; if((pciide_pci_read(sc->sc_pc, sc->sc_tag, |