sddadone: 'error' gets assigned only errno codes, never MMC_ERR codes

MFC after:	2 weeks
This commit is contained in:
Andriy Gapon 2021-07-09 17:28:40 +03:00
parent 00c06804a8
commit e17b58ecbc

View file

@ -1938,7 +1938,7 @@ sddadone(struct cam_periph *periph, union ccb *done_ccb)
/*reduction*/0,
/*timeout*/0,
/*getcount_only*/0);
error = 5; /* EIO */
error = EIO;
} else {
if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0)
panic("REQ_CMP with QFRZN");
@ -1959,7 +1959,7 @@ sddadone(struct cam_periph *periph, union ccb *done_ccb)
softc->outstanding_cmds--;
/* Complete partition switch */
softc->state = SDDA_STATE_NORMAL;
if (error != MMC_ERR_NONE) {
if (error != 0) {
/* TODO: Unpause retune if accessing RPMB */
xpt_release_ccb(done_ccb);
xpt_schedule(periph, CAM_PRIORITY_NORMAL);