diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2012-12-27 11:37:28 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-01-02 14:38:31 -0500 |
commit | 86bfec8d5183be4601db3cc4ffab58fceec33838 (patch) | |
tree | f40500d5563763dad04f88965a8cc1c07b9ffd3a /drivers/net | |
parent | 4010fe21a315b4223c25376714c6a2b61b722e5c (diff) |
rtlwifi: Fix warning for unchecked pci_map_single() call
Kernel 3.8 implements checking of all DMA mapping calls and issues
a WARNING for the first it finds that is not checked.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/rtlwifi/pci.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index 3deacafdcd5e..4261e8ecc4c3 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
@@ -743,6 +743,8 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) | |||
743 | 743 | ||
744 | done: | 744 | done: |
745 | bufferaddress = (*((dma_addr_t *)skb->cb)); | 745 | bufferaddress = (*((dma_addr_t *)skb->cb)); |
746 | if (pci_dma_mapping_error(rtlpci->pdev, bufferaddress)) | ||
747 | return; | ||
746 | tmp_one = 1; | 748 | tmp_one = 1; |
747 | rtlpriv->cfg->ops->set_desc((u8 *) pdesc, false, | 749 | rtlpriv->cfg->ops->set_desc((u8 *) pdesc, false, |
748 | HW_DESC_RXBUFF_ADDR, | 750 | HW_DESC_RXBUFF_ADDR, |
@@ -1115,6 +1117,10 @@ static int _rtl_pci_init_rx_ring(struct ieee80211_hw *hw) | |||
1115 | PCI_DMA_FROMDEVICE); | 1117 | PCI_DMA_FROMDEVICE); |
1116 | 1118 | ||
1117 | bufferaddress = (*((dma_addr_t *)skb->cb)); | 1119 | bufferaddress = (*((dma_addr_t *)skb->cb)); |
1120 | if (pci_dma_mapping_error(rtlpci->pdev, bufferaddress)) { | ||
1121 | dev_kfree_skb_any(skb); | ||
1122 | return 1; | ||
1123 | } | ||
1118 | rtlpriv->cfg->ops->set_desc((u8 *)entry, false, | 1124 | rtlpriv->cfg->ops->set_desc((u8 *)entry, false, |
1119 | HW_DESC_RXBUFF_ADDR, | 1125 | HW_DESC_RXBUFF_ADDR, |
1120 | (u8 *)&bufferaddress); | 1126 | (u8 *)&bufferaddress); |