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:
@@ -181,6 +181,10 @@ static int ipa_mhi_read_write_host(enum ipa_mhi_dma_dir dir, void *dev_addr,
|
|||||||
if (pdev)
|
if (pdev)
|
||||||
mem.base = dma_alloc_coherent(pdev, mem.size,
|
mem.base = dma_alloc_coherent(pdev, mem.size,
|
||||||
&mem.phys_base, GFP_KERNEL);
|
&mem.phys_base, GFP_KERNEL);
|
||||||
|
else {
|
||||||
|
IPA_MHI_ERR("platform dev is not valid");
|
||||||
|
return -EFAULT;
|
||||||
|
}
|
||||||
if (!mem.base) {
|
if (!mem.base) {
|
||||||
IPA_MHI_ERR(
|
IPA_MHI_ERR(
|
||||||
"dma_alloc_coherent failed, DMA buff size %d\n"
|
"dma_alloc_coherent failed, DMA buff size %d\n"
|
||||||
|
@@ -632,12 +632,22 @@ static int ipa_wdi_enable_pipes_internal(void)
|
|||||||
ipa_ep_idx_tx = ipa_get_ep_mapping(IPA_CLIENT_WLAN2_CONS);
|
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_wdi_ctx->wdi_version == IPA_WDI_3) {
|
||||||
if (ipa_enable_wdi_pipes(ipa_ep_idx_tx, ipa_ep_idx_rx)) {
|
if (ipa_enable_wdi_pipes(ipa_ep_idx_tx, ipa_ep_idx_rx)) {
|
||||||
IPA_WDI_ERR("fail to enable wdi pipes\n");
|
IPA_WDI_ERR("fail to enable wdi pipes\n");
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
} else {
|
} 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)) {
|
if (ipa3_enable_wdi_pipe(ipa_wdi_ctx->tx_pipe_hdl)) {
|
||||||
IPA_WDI_ERR("fail to enable wdi tx pipe\n");
|
IPA_WDI_ERR("fail to enable wdi tx pipe\n");
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
@@ -497,7 +497,7 @@ static void rmnet_ctl_wakeup_ipa(struct work_struct *work)
|
|||||||
int ret;
|
int ret;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
int len;
|
int len = 0;
|
||||||
|
|
||||||
/* calling from WQ */
|
/* calling from WQ */
|
||||||
ret = ipa_pm_activate_sync(rmnet_ctl_ipa3_ctx->rmnet_ctl_pm_hdl);
|
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 */
|
/* dequeue the skb */
|
||||||
while (skb_queue_len(&rmnet_ctl_ipa3_ctx->tx_queue) > 0) {
|
while (skb_queue_len(&rmnet_ctl_ipa3_ctx->tx_queue) > 0) {
|
||||||
skb = skb_dequeue(&rmnet_ctl_ipa3_ctx->tx_queue);
|
skb = skb_dequeue(&rmnet_ctl_ipa3_ctx->tx_queue);
|
||||||
if (skb)
|
if (skb == NULL)
|
||||||
len = skb->len;
|
continue;
|
||||||
|
len = skb->len;
|
||||||
spin_unlock_irqrestore(&rmnet_ctl_ipa3_ctx->tx_lock, flags);
|
spin_unlock_irqrestore(&rmnet_ctl_ipa3_ctx->tx_lock, flags);
|
||||||
/*
|
/*
|
||||||
* both data packets and command will be routed to
|
* both data packets and command will be routed to
|
||||||
|
Reference in New Issue
Block a user