diff options
Diffstat (limited to 'drivers/platform/msm/mhi_dev/mhi.c')
-rw-r--r-- | drivers/platform/msm/mhi_dev/mhi.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/platform/msm/mhi_dev/mhi.c b/drivers/platform/msm/mhi_dev/mhi.c index 99549ff37346..1730526712db 100644 --- a/drivers/platform/msm/mhi_dev/mhi.c +++ b/drivers/platform/msm/mhi_dev/mhi.c @@ -1686,9 +1686,6 @@ static int mhi_dev_abort(struct mhi_dev *mhi) flush_workqueue(mhi->ring_init_wq); flush_workqueue(mhi->pending_ring_wq); - /* Initiate MHI IPA reset */ - ipa_mhi_destroy(); - /* Clean up initialized channels */ rc = mhi_deinit(mhi); if (rc) { @@ -2282,6 +2279,7 @@ free_ereqs: ch->ereqs = NULL; free_client: kfree(*handle_client); + *handle_client = NULL; exit: mutex_unlock(&ch->ch_lock); return rc; @@ -2293,6 +2291,11 @@ int mhi_dev_channel_isempty(struct mhi_dev_client *handle) struct mhi_dev_channel *ch; int rc; + if (!handle) { + mhi_log(MHI_MSG_ERROR, "Invalid channel access\n"); + return -EINVAL; + } + ch = handle->channel; if (!ch) return -EINVAL; @@ -2308,6 +2311,11 @@ int mhi_dev_close_channel(struct mhi_dev_client *handle) struct mhi_dev_channel *ch; int rc = 0; + if (!handle) { + mhi_log(MHI_MSG_ERROR, "Invalid channel access\n"); + return -EINVAL; + } + ch = handle->channel; mutex_lock(&ch->ch_lock); |