aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index b4f7510f51ec..0daededb0ff2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -394,7 +394,9 @@ int iwl_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv,
394 return -EINVAL; 394 return -EINVAL;
395 } 395 }
396 396
397 BUG_ON(addr & ~DMA_BIT_MASK(36)); 397 if (WARN_ON(addr & ~DMA_BIT_MASK(36)))
398 return -EINVAL;
399
398 if (unlikely(addr & ~IWL_TX_DMA_MASK)) 400 if (unlikely(addr & ~IWL_TX_DMA_MASK))
399 IWL_ERR(priv, "Unaligned address = %llx\n", 401 IWL_ERR(priv, "Unaligned address = %llx\n",
400 (unsigned long long)addr); 402 (unsigned long long)addr);
@@ -718,7 +720,10 @@ static void iwl_rx_handle(struct iwl_priv *priv)
718 /* If an RXB doesn't have a Rx queue slot associated with it, 720 /* If an RXB doesn't have a Rx queue slot associated with it,
719 * then a bug has been introduced in the queue refilling 721 * then a bug has been introduced in the queue refilling
720 * routines -- catch it here */ 722 * routines -- catch it here */
721 BUG_ON(rxb == NULL); 723 if (WARN_ON(rxb == NULL)) {
724 i = (i + 1) & RX_QUEUE_MASK;
725 continue;
726 }
722 727
723 rxq->queue[i] = NULL; 728 rxq->queue[i] = NULL;
724 729