projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31b683b
)
vxge: use pci_dma_mapping_error to test return value
author
Denis Kirjanov
<kirjanov@gmail.com>
Sun, 10 Jan 2010 21:40:10 +0000
(13:40 -0800)
committer
David S. Miller
<davem@davemloft.net>
Sun, 10 Jan 2010 21:40:10 +0000
(13:40 -0800)
pci_dma_mapping_error should be used to test return value of
pci_map_single or pci_map_page.
Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxge/vxge-main.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/vxge/vxge-main.c
b/drivers/net/vxge/vxge-main.c
index 0fdfd58a35a1bc9572c27b164b4ed8e81a0060e1..b9685e82f7b66b4c2b08cd9cc177d3b9cae808d8 100644
(file)
--- a/
drivers/net/vxge/vxge-main.c
+++ b/
drivers/net/vxge/vxge-main.c
@@
-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;
}