]> git.baikalelectronics.ru Git - kernel.git/commit
drivers: atm: eni: Add pci_dma_mapping_error() call
authorTina Johnson <tinajohnson.1234@gmail.com>
Thu, 20 Nov 2014 10:24:54 +0000 (15:54 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Nov 2014 20:03:40 +0000 (15:03 -0500)
commit889919d1ff89e2d4afdc088850a947d2e837add1
treeee5f271c7fcaa51073bea01e02d1c435906978df
parentad9f80e7422ef0096c9c0ef50ac8f13b586544e9
drivers: atm: eni: Add pci_dma_mapping_error() call

Added a pci_dma_mapping_error() call to check for mapping errors before
further using the dma handle. In case of error, control goes to a new label
where the incoming skb is freed. Unchecked dma handles were found using
Coccinelle:

@rule1@
expression e1;
identifier x;
@@

*x = pci_map_single(...);
 ... when != pci_dma_mapping_error(e1,x)

Signed-off-by: Tina Johnson <tinajohnson.1234@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/atm/eni.c