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()
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
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
4 matches
Mail list logo