Avoid testing an uninitialised variable in the SCSI_BUSY/SCSI_QUEUE_FULL
authorjsg <jsg@openbsd.org>
Tue, 27 Jun 2017 12:04:26 +0000 (12:04 +0000)
committerjsg <jsg@openbsd.org>
Tue, 27 Jun 2017 12:04:26 +0000 (12:04 +0000)
paths of hvs_scsi_cmd_done().

ok mikeb@

sys/dev/pv/hvs.c

index ca5ff1a..48b7a59 100644 (file)
@@ -639,7 +639,7 @@ hvs_scsi_cmd_done(struct hvs_ccb *ccb)
                printf("%s: status %#x iostatus %#x (busy)\n",
                    sc->sc_dev.dv_xname, srb->srb_scsistatus,
                    srb->srb_iostatus);
-               xs->error = XS_BUSY;
+               error = XS_BUSY;
                break;
        case SCSI_CHECK:
                if (srb->srb_iostatus & SRB_STATUS_AUTOSENSE_VALID) {