diff options
author | Amitoj Kaur Chawla <amitoj1606@gmail.com> | 2016-03-12 09:31:04 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-28 14:30:36 (GMT) |
commit | 514dd88df707a1094e937c20d5a0b1ec619e1f96 (patch) | |
tree | 48e2aae5fcc280530df1137ca9a99ace19a29cde /arch/x86 | |
parent | afb105549d4879018e45bbf77e76034237d8fc20 (diff) | |
download | linux-514dd88df707a1094e937c20d5a0b1ec619e1f96.tar.xz |
staging: slicoss: Add error check for pci_map_single
Currently, DMA mapping failure is not detected, causing the hardware
to attempt a DMA from an invalid address.
This patch adds the corresponding error check for pci_map_single i.e.
pci_dma_mapping_error.
Problem found using the following Coccinelle semantic patch:
// <smpl>
@@
expression e1;
identifier x;
@@
x=
(
*dma_map_single(...)
|
*dma_map_page(...)
)
... when != dma_mapping_error(e1,x)
@@
expression e1;
identifier x;
@@
x =
(
*pci_map_single(...)
|
*pci_map_page(...)
)
... when != pci_dma_mapping_error(e1,x)
// </smpl>
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86')
0 files changed, 0 insertions, 0 deletions