Commit d21fa2da authored by Johannes Berg's avatar Johannes Berg

iwlwifi: don't memset scalar values

The dma_addr_t type is a scalar value, so it should
just be assigned, not memset.
Reviewed-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent abae2386
...@@ -436,7 +436,7 @@ static int iwl_pcie_rx_alloc(struct iwl_trans *trans) ...@@ -436,7 +436,7 @@ static int iwl_pcie_rx_alloc(struct iwl_trans *trans)
err_rb_stts: err_rb_stts:
dma_free_coherent(dev, sizeof(__le32) * RX_QUEUE_SIZE, dma_free_coherent(dev, sizeof(__le32) * RX_QUEUE_SIZE,
rxq->bd, rxq->bd_dma); rxq->bd, rxq->bd_dma);
memset(&rxq->bd_dma, 0, sizeof(rxq->bd_dma)); rxq->bd_dma = 0;
rxq->bd = NULL; rxq->bd = NULL;
err_bd: err_bd:
return -ENOMEM; return -ENOMEM;
...@@ -553,7 +553,7 @@ void iwl_pcie_rx_free(struct iwl_trans *trans) ...@@ -553,7 +553,7 @@ void iwl_pcie_rx_free(struct iwl_trans *trans)
dma_free_coherent(trans->dev, sizeof(__le32) * RX_QUEUE_SIZE, dma_free_coherent(trans->dev, sizeof(__le32) * RX_QUEUE_SIZE,
rxq->bd, rxq->bd_dma); rxq->bd, rxq->bd_dma);
memset(&rxq->bd_dma, 0, sizeof(rxq->bd_dma)); rxq->bd_dma = 0;
rxq->bd = NULL; rxq->bd = NULL;
if (rxq->rb_stts) if (rxq->rb_stts)
...@@ -562,7 +562,7 @@ void iwl_pcie_rx_free(struct iwl_trans *trans) ...@@ -562,7 +562,7 @@ void iwl_pcie_rx_free(struct iwl_trans *trans)
rxq->rb_stts, rxq->rb_stts_dma); rxq->rb_stts, rxq->rb_stts_dma);
else else
IWL_DEBUG_INFO(trans, "Free rxq->rb_stts which is NULL\n"); IWL_DEBUG_INFO(trans, "Free rxq->rb_stts which is NULL\n");
memset(&rxq->rb_stts_dma, 0, sizeof(rxq->rb_stts_dma)); rxq->rb_stts_dma = 0;
rxq->rb_stts = NULL; rxq->rb_stts = NULL;
} }
......
...@@ -615,7 +615,7 @@ static void iwl_pcie_txq_free(struct iwl_trans *trans, int txq_id) ...@@ -615,7 +615,7 @@ static void iwl_pcie_txq_free(struct iwl_trans *trans, int txq_id)
if (txq->q.n_bd) { if (txq->q.n_bd) {
dma_free_coherent(dev, sizeof(struct iwl_tfd) * dma_free_coherent(dev, sizeof(struct iwl_tfd) *
txq->q.n_bd, txq->tfds, txq->q.dma_addr); txq->q.n_bd, txq->tfds, txq->q.dma_addr);
memset(&txq->q.dma_addr, 0, sizeof(txq->q.dma_addr)); txq->q.dma_addr = 0;
} }
kfree(txq->entries); kfree(txq->entries);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment