Commit 8ae0cfee2a727f698bda12e530f4879a9793c6c9

Authored by Julia Lawall
Committed by David S. Miller
1 parent 32aa64f77e

drivers/atm/solos-pci.c: exchange pci_iounmaps

The calls to pci_iounmap are in the wrong order, as compared to the
associated calls to pci_iomap.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e,x;
statement S,S1;
int ret;
@@
e = pci_iomap(x,...)
... when != pci_iounmap(x,e)
if (<+...e...+>) S
... when any
    when != pci_iounmap(x,e)
*if (...)
   { ... when != pci_iounmap(x,e)
     return ...; }
... when any
pci_iounmap(x,e);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

drivers/atm/solos-pci.c
... ... @@ -1206,9 +1206,9 @@
1206 1206  
1207 1207 out_unmap_both:
1208 1208 pci_set_drvdata(dev, NULL);
1209   - pci_iounmap(dev, card->config_regs);
1210   - out_unmap_config:
1211 1209 pci_iounmap(dev, card->buffers);
  1210 + out_unmap_config:
  1211 + pci_iounmap(dev, card->config_regs);
1212 1212 out_release_regions:
1213 1213 pci_release_regions(dev);
1214 1214 out: