msm: ipa3: changes to return correct variable value
When GSI stop channel is failing, & retrying & IPA_HW < 4.0,
the return variable is being updated by the immediate other
function as well, there it results in updating & returning
a wrong value, finally leading to exit without removing endp_delay
on that pipe, results in without stopping the channel thereafter
so corrected it with adding a new variable.
Change-Id: If0ee3986ae40941ce4409d6fb5d74b37db9b7190
Signed-off-by: Jagadeesh Ponduru <quic_jponduru@quicinc.com>
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c b/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c
index de60a93..4fabe64 100644
--- a/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c
+++ b/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c
@@ -11718,6 +11718,7 @@
{
struct ipa_mem_buffer mem;
int res = 0;
+ int result = 0;
int i;
struct ipa3_ep_context *ep;
enum ipa_client_type client_type;
@@ -11813,10 +11814,10 @@
if (ipa3_ctx->ipa_hw_type < IPA_HW_v4_0) {
IPADBG("Inject a DMA_TASK with 1B packet to IPA\n");
/* Send a 1B packet DMA_TASK to IPA and try again */
- res = ipa3_inject_dma_task_for_gsi();
- if (res) {
+ result = ipa3_inject_dma_task_for_gsi();
+ if (result) {
IPAERR("Failed to inject DMA TASk for GSI\n");
- return res;
+ return result;
}
}
/* sleep for short period to flush IPA */