chdone(): Prevent returning uninitialized scalar value.
Improve over the solution in r297527: Instead of attempting to initialize all the possible cases, just move the check nearer to the case where it makes sense. CID: 1006486 Reviewed by: ken MFC after: 2 weeks
This commit is contained in:
parent
f232b3913a
commit
d8e49c71e3
@ -648,10 +648,14 @@ chdone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
softc->sc_counts[CHET_IE],
|
||||
PLURAL(softc->sc_counts[CHET_IE]));
|
||||
#undef PLURAL
|
||||
if (announce_buf[0] != '\0') {
|
||||
xpt_announce_periph(periph, announce_buf);
|
||||
xpt_announce_quirks(periph, softc->quirks,
|
||||
CH_Q_BIT_STRING);
|
||||
}
|
||||
} else {
|
||||
int error;
|
||||
|
||||
announce_buf[0] = '\0';
|
||||
error = cherror(done_ccb, CAM_RETRY_SELTO,
|
||||
SF_RETRY_UA | SF_NO_PRINT);
|
||||
/*
|
||||
@ -715,14 +719,8 @@ chdone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
|
||||
cam_periph_invalidate(periph);
|
||||
|
||||
announce_buf[0] = '\0';
|
||||
}
|
||||
}
|
||||
if (announce_buf[0] != '\0') {
|
||||
xpt_announce_periph(periph, announce_buf);
|
||||
xpt_announce_quirks(periph, softc->quirks,
|
||||
CH_Q_BIT_STRING);
|
||||
}
|
||||
softc->state = CH_STATE_NORMAL;
|
||||
free(mode_header, M_SCSICH);
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user