summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMarco Peereboom <marco@cvs.openbsd.org>2009-09-21 16:38:14 +0000
committerMarco Peereboom <marco@cvs.openbsd.org>2009-09-21 16:38:14 +0000
commite9052ad7e4020c259271643e3ffbd03bdff5dafb (patch)
tree28d784bd00c97c7443cae36299fb171ff9b3a967 /sys
parent7dfcbed9b6b1886396c0215dfa0469640833e1a5 (diff)
Fix use before init on wu.
Found by jsing, tested and ok jsing.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/softraid.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index 29563b33277..8efb21761d9 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.173 2009/09/03 13:26:38 jsing Exp $ */
+/* $OpenBSD: softraid.c,v 1.174 2009/09/21 16:38:13 marco Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -1792,7 +1792,7 @@ sr_scsi_cmd(struct scsi_xfer *xs)
int s;
struct scsi_link *link = xs->sc_link;
struct sr_softc *sc = link->adapter_softc;
- struct sr_workunit *wu;
+ struct sr_workunit *wu = NULL;
struct sr_discipline *sd;
DNPRINTF(SR_D_CMD, "%s: sr_scsi_cmd: scsibus%d xs: %p "
@@ -1807,7 +1807,6 @@ sr_scsi_cmd(struct scsi_xfer *xs)
DNPRINTF(SR_D_CMD, "%s: sr_scsi_cmd: attaching %p\n",
DEVNAME(sc), sd);
if (sd == NULL) {
- wu = NULL;
printf("%s: sr_scsi_cmd NULL discipline\n",
DEVNAME(sc));
goto stuffup;