aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/pcie.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/mwifiex/pcie.c')
-rw-r--r--drivers/net/wireless/mwifiex/pcie.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c
index d34acf082d3a..a2f32008f9a8 100644
--- a/drivers/net/wireless/mwifiex/pcie.c
+++ b/drivers/net/wireless/mwifiex/pcie.c
@@ -386,7 +386,6 @@ static int mwifiex_pcie_create_txbd_ring(struct mwifiex_adapter *adapter)
386 card->txbd_ring_vbase = kzalloc(card->txbd_ring_size, GFP_KERNEL); 386 card->txbd_ring_vbase = kzalloc(card->txbd_ring_size, GFP_KERNEL);
387 if (!card->txbd_ring_vbase) { 387 if (!card->txbd_ring_vbase) {
388 dev_err(adapter->dev, "Unable to allocate buffer for txbd ring.\n"); 388 dev_err(adapter->dev, "Unable to allocate buffer for txbd ring.\n");
389 kfree(card->txbd_ring_vbase);
390 return -1; 389 return -1;
391 } 390 }
392 card->txbd_ring_pbase = virt_to_phys(card->txbd_ring_vbase); 391 card->txbd_ring_pbase = virt_to_phys(card->txbd_ring_vbase);
@@ -1229,9 +1228,12 @@ static int mwifiex_pcie_event_complete(struct mwifiex_adapter *adapter,
1229 if (!skb) 1228 if (!skb)
1230 return 0; 1229 return 0;
1231 1230
1232 if (rdptr >= MWIFIEX_MAX_EVT_BD) 1231 if (rdptr >= MWIFIEX_MAX_EVT_BD) {
1233 dev_err(adapter->dev, "event_complete: Invalid rdptr 0x%x\n", 1232 dev_err(adapter->dev, "event_complete: Invalid rdptr 0x%x\n",
1234 rdptr); 1233 rdptr);
1234 ret = -EINVAL;
1235 goto done;
1236 }
1235 1237
1236 /* Read the event ring write pointer set by firmware */ 1238 /* Read the event ring write pointer set by firmware */
1237 if (mwifiex_read_reg(adapter, REG_EVTBD_WRPTR, &wrptr)) { 1239 if (mwifiex_read_reg(adapter, REG_EVTBD_WRPTR, &wrptr)) {
@@ -1672,9 +1674,8 @@ static int mwifiex_pcie_host_to_card(struct mwifiex_adapter *adapter, u8 type,
1672 struct sk_buff *skb, 1674 struct sk_buff *skb,
1673 struct mwifiex_tx_param *tx_param) 1675 struct mwifiex_tx_param *tx_param)
1674{ 1676{
1675 if (!adapter || !skb) { 1677 if (!skb) {
1676 dev_err(adapter->dev, "Invalid parameter in %s <%p, %p>\n", 1678 dev_err(adapter->dev, "Passed NULL skb to %s\n", __func__);
1677 __func__, adapter, skb);
1678 return -1; 1679 return -1;
1679 } 1680 }
1680 1681