diff options
author | Julia Lawall <julia@diku.dk> | 2011-07-12 01:08:25 +0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-07-27 17:45:08 +0400 |
commit | f170c684b55cb8d3bab55b1fb8fa812778d551f2 (patch) | |
tree | 1a6c2a6374e0463401a6219961c5b348c55f9d70 /drivers/scsi/device_handler/scsi_dh_rdac.c | |
parent | b5b515445f4f5a905c5dd27e6e682868ccd6c09d (diff) | |
download | linux-f170c684b55cb8d3bab55b1fb8fa812778d551f2.tar.xz |
[SCSI] ipr: reorder error handling code to include iounmap
The out_msi_disable label should be before cleanup_nomem to additionally
benefit from the call to iounmap. Subsequent gotos are adjusted to go to
out_msi_disable instead of cleanup_nomem, which now follows it. This is
safe because pci_disable_msi does nothing if pci_enable_msi was not called.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@r@
expression e1,e2;
statement S;
@@
e1 = pci_ioremap_bar(...);
... when != e1 = e2
when != iounmap(e1)
when any
(
if (<+...e1...+>) S
|
if(...) { ... return 0; }
|
if (...) { ... when != iounmap(e1)
when != if (...) { ... iounmap(e1) ... }
* return ...;
} else S
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/device_handler/scsi_dh_rdac.c')
0 files changed, 0 insertions, 0 deletions