techpack: ipa: Fixing compile errors

Addressed unintialized pointers and P1 errors and
fixing them accordingly.

Change-Id: Iba70c5fdf91fffd823c3473383e687fe8b549b64
Signed-off-by: Michael Adisumarta <madisuma@codeauror.org>
This commit is contained in:
Michael Adisumarta 2020-07-14 16:43:36 -07:00
parent 86e8365599
commit dd7950746f
3 changed files with 18 additions and 3 deletions

View File

@ -181,6 +181,10 @@ static int ipa_mhi_read_write_host(enum ipa_mhi_dma_dir dir, void *dev_addr,
if (pdev)
mem.base = dma_alloc_coherent(pdev, mem.size,
&mem.phys_base, GFP_KERNEL);
else {
IPA_MHI_ERR("platform dev is not valid");
return -EFAULT;
}
if (!mem.base) {
IPA_MHI_ERR(
"dma_alloc_coherent failed, DMA buff size %d\n"

View File

@ -632,12 +632,22 @@ static int ipa_wdi_enable_pipes_internal(void)
ipa_ep_idx_tx = ipa_get_ep_mapping(IPA_CLIENT_WLAN2_CONS);
}
if (ipa_ep_idx_tx <= 0 || ipa_ep_idx_rx <= 0)
return -EFAULT;
if (ipa_wdi_ctx->wdi_version == IPA_WDI_3) {
if (ipa_enable_wdi_pipes(ipa_ep_idx_tx, ipa_ep_idx_rx)) {
IPA_WDI_ERR("fail to enable wdi pipes\n");
return -EFAULT;
}
} else {
if ((ipa_wdi_ctx->tx_pipe_hdl >= IPA3_MAX_NUM_PIPES) ||
(ipa_wdi_ctx->tx_pipe_hdl < 0) ||
(ipa_wdi_ctx->rx_pipe_hdl >= IPA3_MAX_NUM_PIPES) ||
(ipa_wdi_ctx->rx_pipe_hdl < 0)) {
IPA_WDI_ERR("pipe handle not valid\n");
return -EFAULT;
}
if (ipa3_enable_wdi_pipe(ipa_wdi_ctx->tx_pipe_hdl)) {
IPA_WDI_ERR("fail to enable wdi tx pipe\n");
return -EFAULT;

View File

@ -497,7 +497,7 @@ static void rmnet_ctl_wakeup_ipa(struct work_struct *work)
int ret;
unsigned long flags;
struct sk_buff *skb;
int len;
int len = 0;
/* calling from WQ */
ret = ipa_pm_activate_sync(rmnet_ctl_ipa3_ctx->rmnet_ctl_pm_hdl);
@ -514,8 +514,9 @@ static void rmnet_ctl_wakeup_ipa(struct work_struct *work)
/* dequeue the skb */
while (skb_queue_len(&rmnet_ctl_ipa3_ctx->tx_queue) > 0) {
skb = skb_dequeue(&rmnet_ctl_ipa3_ctx->tx_queue);
if (skb)
len = skb->len;
if (skb == NULL)
continue;
len = skb->len;
spin_unlock_irqrestore(&rmnet_ctl_ipa3_ctx->tx_lock, flags);
/*
* both data packets and command will be routed to