Fix busy status leak in case of incorrect passthrough args.

MFC after:	1 week
This commit is contained in:
Alexander Motin 2019-05-30 14:13:09 +00:00
parent 9d0073e413
commit 1a15d60d0e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=348417
2 changed files with 8 additions and 4 deletions

View File

@ -791,8 +791,10 @@ mpr_user_pass_thru(struct mpr_softc *sc, mpr_pass_thru_t *data)
data->DataDirection = MPR_PASS_THRU_DIRECTION_READ;
else
data->DataOutSize = 0;
} else
return (EINVAL);
} else {
err = EINVAL;
goto RetFreeUnlocked;
}
mpr_dprint(sc, MPR_USER, "%s: req 0x%jx %d rpl 0x%jx %d "
"data in 0x%jx %d data out 0x%jx %d data dir %d\n", __func__,

View File

@ -802,8 +802,10 @@ mps_user_pass_thru(struct mps_softc *sc, mps_pass_thru_t *data)
data->DataDirection = MPS_PASS_THRU_DIRECTION_READ;
else
data->DataOutSize = 0;
} else
return (EINVAL);
} else {
err = EINVAL;
goto RetFreeUnlocked;
}
mps_dprint(sc, MPS_USER, "%s: req 0x%jx %d rpl 0x%jx %d "
"data in 0x%jx %d data out 0x%jx %d data dir %d\n", __func__,