[PATCH 2/2] drivers: scsi: mpt2sas: Clean up error handling for calls to pci_map_single

2015-01-17 Thread Tina Johnson
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

[PATCH 1/2] drivers: scsi: mpt2sas: Added pci_dma_mapping_error() call

2015-01-17 Thread 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

[PATCH 0/2] Added pci_mapping_error() call and related clean up

2015-01-17 Thread 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

[PATCH] drivers: message: Clean up error handling for calls to pci_map_single

2015-01-13 Thread Tina Johnson
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