From a5cd7eaa3bffbdd0fdb7d83fa85adabf09f84c9b Mon Sep 17 00:00:00 2001 From: marco Date: Mon, 21 Sep 2009 16:38:13 +0000 Subject: Fix use before init on wu. Found by jsing, tested and ok jsing. --- sys/dev/softraid.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sys/dev/softraid.c') 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 * Copyright (c) 2008 Chris Kuethe @@ -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; -- cgit v1.2.3-59-g8ed1b