Merge "mhi: core: Read transfer length from an event properly"
This commit is contained in:
commit
c2ac24a1a9
@ -1070,7 +1070,9 @@ static int parse_rsc_event(struct mhi_controller *mhi_cntrl,
|
||||
|
||||
result.transaction_status = (ev_code == MHI_EV_CC_OVERFLOW) ?
|
||||
-EOVERFLOW : 0;
|
||||
result.bytes_xferd = xfer_len;
|
||||
|
||||
/* truncate to buf len if xfer_len is larger */
|
||||
result.bytes_xferd = min_t(u16, xfer_len, buf_info->len);
|
||||
result.buf_addr = buf_info->cb_buf;
|
||||
result.dir = mhi_chan->dir;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user