git: e17b58ecbcb6 - main - sddadone: 'error' gets assigned only errno codes, never MMC_ERR codes

From: Andriy Gapon <avg_at_FreeBSD.org>
Date: Sat, 13 Nov 2021 09:20:34 UTC
The branch main has been updated by avg:

URL: https://cgit.FreeBSD.org/src/commit/?id=e17b58ecbcb644f76cceda4ca7ff08f7677b5dfd

commit e17b58ecbcb644f76cceda4ca7ff08f7677b5dfd
Author:     Andriy Gapon <avg@FreeBSD.org>
AuthorDate: 2021-07-09 14:28:40 +0000
Commit:     Andriy Gapon <avg@FreeBSD.org>
CommitDate: 2021-11-13 09:20:14 +0000

    sddadone: 'error' gets assigned only errno codes, never MMC_ERR codes
    
     MFC after:     2 weeks
---
 sys/cam/mmc/mmc_da.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/cam/mmc/mmc_da.c b/sys/cam/mmc/mmc_da.c
index 4212e2aa805d..0dfa43f4679b 100644
--- a/sys/cam/mmc/mmc_da.c
+++ b/sys/cam/mmc/mmc_da.c
@@ -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);