Commit fa15e99b authored by Denis Kirjanov's avatar Denis Kirjanov Committed by David S. Miller

vxge: use pci_dma_mapping_error to test return value

pci_dma_mapping_error should be used to test return value of
pci_map_single or pci_map_page.
Signed-off-by: default avatarDenis Kirjanov <kirjanov@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 31b683b6
......@@ -310,7 +310,7 @@ static int vxge_rx_map(void *dtrh, struct vxge_ring *ring)
dma_addr = pci_map_single(ring->pdev, rx_priv->skb_data,
rx_priv->data_size, PCI_DMA_FROMDEVICE);
if (dma_addr == 0) {
if (unlikely(pci_dma_mapping_error(ring->pdev, dma_addr))) {
ring->stats.pci_map_fail++;
return -EIO;
}
......
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