Replaced null test on dma handle with pci_dma_mapping_error()
o check for mapping errors. Coccinelle was used to find cases
that do not check for dma mapping errors:
@rule1@
statement S;
identifier x;
@@
*x = pci_map_single(...);
if (!x) S
Signed-off-by: Tina Johnson
Acked-by: Julia Lawall
the out variables. Labels were renamed and gotos altered accordingly.
*At the point of the goto free_pci, neither the in nor the out variables
are allocated and hence no freeing required. The free_pci label is removed
and the goto free_pci is replaced with goto out.
Signed-off-by: Tina Johnson
Replaced null test on dma handle with pci_dma_mapping_error() and cleaned
up the error handling code.
Tina Johnson (2):
drivers: scsi: mpt2sas: Added pci_dma_mapping_error() call
drivers: scsi: mpt2sas: Clean up error handling for calls to pci_map_single
drivers/scsi/mpt2sas
for freeing dma_addr_out (unmap_out) and
dma_addr_in (unmap_in).
Coccinelle was used to find unchecked dma handles, as follows:
@rule1@
expression e1;
identifier x;
@@
*x = pci_map_single(...);
... when != pci_dma_mapping_error(e1,x)
Signed-off-by: Tina Johnson
Acked-by: Julia Lawall
(...);
... when != pci_dma_mapping_error(e1,x)
Signed-off-by: Tina Johnson
Acked-by: Julia Lawall
---
v2: *Removed jump to trouble label
*Added a new label dma_map_error
drivers/atm/eni.c |3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c
index
On Mon, 10 Nov 2014, David Miller wrote:
> The 'trouble' label assumes that it is recovering and unwinding state
> when an error occurs after the DMA buffer is successfully mapped.
>
> It unconditionally does pci_unmap_single() if 'paddr' is non-zero
> which it might be in the error case dependi
Added a pci_dma_mapping_error() call to check for mapping errors before
further using the dma handle. 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
Acked
This is a clean-up patch to the attribute_container.c file to fix
the whitespace errors.
Signed-off-by: Tina Johnson
---
drivers/base/attribute_container.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/base/attribute_container.c
b/drivers/base
Fix checkpatch.pl issues with coding style. Added and removed spaces
accordingly.
Signed-off-by: Tina Johnson
---
drivers/base/attribute_container.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/base/attribute_container.c
b/drivers/base
Clean-up patches to fix checkpatch.pl errors.
Tina Johnson (2):
Base: fix whitespace errors
Base: fix coding style issues
drivers/base/attribute_container.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
--
1.7.10.4
--
To unsubscribe from this list: send the line
10 matches
Mail list logo