mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
msm: mhi: Release inbuf_list memory in channel disconnect
Driver allocates in_buf_list.addr during open_client_mhi_channels, which is called for every CONNECT event for AT_CTRL channels. in_buf_list.addr is not released during DISCONNECT event. Adding a fix to release this memory during a channel DISCONNECT event. Change-Id: Idd7cac731137934d820e6a8a07335982575a913b Signed-off-by: Subramanian Ananthanarayanan <skananth@codeaurora.org> Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
This commit is contained in:
parent
b3f6abccd5
commit
9a551ddff3
1 changed files with 7 additions and 1 deletions
|
|
@ -1941,7 +1941,7 @@ static void mhi_uci_at_ctrl_tre_cb(struct mhi_dev_client_cb_reason *reason)
|
|||
static void mhi_uci_at_ctrl_client_cb(struct mhi_dev_client_cb_data *cb_data)
|
||||
{
|
||||
struct uci_client *client = cb_data->user_data;
|
||||
int rc;
|
||||
int rc, i;
|
||||
struct mhi_req *ureq;
|
||||
|
||||
uci_log(UCI_DBG_VERBOSE, " Rcvd MHI cb for channel %d, state %d\n",
|
||||
|
|
@ -1980,6 +1980,12 @@ static void mhi_uci_at_ctrl_client_cb(struct mhi_dev_client_cb_data *cb_data)
|
|||
/* Add to in-use list */
|
||||
list_add_tail(&ureq->list, &client->req_list);
|
||||
}
|
||||
|
||||
for (i = 0; i < (client->in_chan_attr->nr_trbs); i++) {
|
||||
kfree(client->in_buf_list[i].addr);
|
||||
client->in_buf_list[i].addr = NULL;
|
||||
client->in_buf_list[i].buf_size = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue