DM USB: clean up the assert usage

Remove assert in USB mediator code.

Tracked-On: #3252
Signed-off-by: Xiaoguang Wu <xiaoguang.wu@intel.com>
Reviewed-by: Shuo A Liu <shuo.a.liu@intel.com>
This commit is contained in:
Xiaoguang Wu
2019-06-25 14:52:38 +08:00
committed by Eddie Dong
parent 7e6ff2a176
commit 31e23cd09c
3 changed files with 14 additions and 130 deletions

View File

@@ -328,8 +328,6 @@ umouse_request(void *scarg, struct usb_data_xfer *xfer)
data = NULL;
udata = NULL;
assert(xfer != NULL && xfer->head >= 0);
idx = xfer->head;
for (i = 0; i < xfer->ndata; i++) {
xfer->data[idx].bdone = 0;
@@ -702,8 +700,6 @@ umouse_data_handler(void *scarg, struct usb_data_xfer *xfer, int dir,
int len, i, idx;
int err;
assert(xfer != NULL && xfer->head >= 0);
UPRINTF(LDBG, "handle data - DIR=%s|EP=%d, blen %d\r\n",
dir ? "IN" : "OUT", epctx, xfer->data[0].blen);