summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorchl <chl@openbsd.org>2008-09-18 09:06:27 +0000
committerchl <chl@openbsd.org>2008-09-18 09:06:27 +0000
commit83e1750f1bb858ac9beb85cb6a008ce0dc4f8254 (patch)
tree449eef4bfcc3c114d33a45bbc71f7a8cd2fed002 /sys/dev
parentdocument -A and include in usage (diff)
downloadwireguard-openbsd-83e1750f1bb858ac9beb85cb6a008ce0dc4f8254.tar.xz
wireguard-openbsd-83e1750f1bb858ac9beb85cb6a008ce0dc4f8254.zip
fix potential use of uninitialized value
Found by LLVM/Clang Static Analyzer. ok claudio@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/musycc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/pci/musycc.c b/sys/dev/pci/musycc.c
index caed3ebeeae..122539adcdf 100644
--- a/sys/dev/pci/musycc.c
+++ b/sys/dev/pci/musycc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: musycc.c,v 1.18 2007/11/26 09:28:33 martynas Exp $ */
+/* $OpenBSD: musycc.c,v 1.19 2008/09/18 09:06:27 chl Exp $ */
/*
* Copyright (c) 2004,2005 Internet Business Solutions AG, Zurich, Switzerland
@@ -596,7 +596,7 @@ musycc_activate_channel(struct musycc_group *mg, int chan)
void
musycc_stop_channel(struct channel_softc *cc)
{
- struct musycc_group *mg;
+ struct musycc_group *mg = cc->cc_group;
if (cc->cc_state == CHAN_FLOAT) {
/* impossible */
@@ -607,7 +607,6 @@ musycc_stop_channel(struct channel_softc *cc)
return;
}
- mg = cc->cc_group;
ACCOOM_PRINTF(2, ("%s: musycc_stop_channel\n", cc->cc_ifp->if_xname));
musycc_sreq(mg, cc->cc_channel, MUSYCC_SREQ_SET(9), MUSYCC_SREQ_BOTH,
EV_STOP);