mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 06:33:07 +00:00
atm: eni: Add check for dma_map_single
[ Upstream commit0f74b29a4f
] As the potential failure of the dma_map_single(), it should be better to check it and return error if fails. Fixes:1da177e4c3
("Linux-2.6.12-rc2") Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
b1e27cda1e
commit
c7a9b80d0e
1 changed files with 2 additions and 0 deletions
|
@ -1114,6 +1114,8 @@ DPRINTK("iovcnt = %d\n",skb_shinfo(skb)->nr_frags);
|
|||
}
|
||||
paddr = dma_map_single(&eni_dev->pci_dev->dev,skb->data,skb->len,
|
||||
DMA_TO_DEVICE);
|
||||
if (dma_mapping_error(&eni_dev->pci_dev->dev, paddr))
|
||||
return enq_next;
|
||||
ENI_PRV_PADDR(skb) = paddr;
|
||||
/* prepare DMA queue entries */
|
||||
j = 0;
|
||||
|
|
Loading…
Reference in a new issue