kernel-fxtec-pro1x/drivers/pcmcia
Julia Lawall 5a1c3e1aa9 drivers/pcmcia: Add missing iounmap
of_iomap calls ioremap, and so should be matched with an iounmap.  At the
two error returns, the result of calling of_iomap is only stored in a local
variable, so these error paths need to call iounmap.  Furthermore, this
function ultimately stores the result of of_iomap in an array that is local
to the file.  These values should be iounmapped at some point.  I have
added a corresponding call to iounmap at the end of the function
m8xx_remove.

The problem was found using the following semantic match.
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T,T1,T2;
identifier E;
statement S;
expression x1,x2,x3;
int ret;
@@

  T E;
  ...
* E = of_iomap(...);
  if (E == NULL) S
  ... when != iounmap(...,(T1)E,...)
      when != if (E != NULL) { ... iounmap(...,(T1)E,...); ...}
      when != x1 = (T1)E
      when != E = x3;
      when any
  if (...) {
    ... when != iounmap(...,(T2)E,...)
        when != if (E != NULL) { ... iounmap(...,(T2)E,...); ...}
        when != x2 = (T2)E
(
*   return;
|
*   return ret;
)
  }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Vitaly Bordug <vitb@kernel.crashing.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Olof Johansson <olof@lixom.net>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:09 -08:00
..
at91_cf.c at91_cf: use generic gpio calls 2008-02-05 09:44:09 -08:00
au1000_db1x00.c
au1000_generic.c
au1000_generic.h
au1000_pb1x00.c
au1000_xxs1500.c
cardbus.c
cirrus.h
cistpl.c
cs.c
cs_internal.h
ds.c pcmcia: include bad CIS filename in error message 2008-02-05 09:44:08 -08:00
ds_internal.h
electra_cf.c
hd64465_ss.c
i82092.c pcmcia: replace kio_addr_t with unsigned int everywhere 2008-02-05 09:44:08 -08:00
i82092aa.h
i82365.c pcmcia: replace kio_addr_t with unsigned int everywhere 2008-02-05 09:44:08 -08:00
i82365.h
Kconfig
m8xx_pcmcia.c drivers/pcmcia: Add missing iounmap 2008-02-05 09:44:09 -08:00
m32r_cfc.c pcmcia: replace kio_addr_t with unsigned int everywhere 2008-02-05 09:44:08 -08:00
m32r_cfc.h
m32r_pcc.c pcmcia: replace kio_addr_t with unsigned int everywhere 2008-02-05 09:44:08 -08:00
m32r_pcc.h
Makefile
o2micro.h
omap_cf.c
pcmcia_ioctl.c
pcmcia_resource.c pcmcia: convert some internal-only ioaddr_t to unsigned int 2008-02-05 09:44:08 -08:00
pd6729.c
pd6729.h
pxa2xx_base.c [ARM] pxa: move memory controller registers into pxa2xx-regs.h 2008-01-26 15:07:54 +00:00
pxa2xx_base.h
pxa2xx_cm_x270.c
pxa2xx_lubbock.c pcmcia: remove pxa2xx_lubbock build warning 2007-12-23 12:54:37 -08:00
pxa2xx_mainstone.c
pxa2xx_sharpsl.c
ricoh.h
rsrc_mgr.c
rsrc_nonstatic.c pcmcia: replace kio_addr_t with unsigned int everywhere 2008-02-05 09:44:08 -08:00
sa11xx_base.c
sa11xx_base.h
sa1100_assabet.c
sa1100_badge4.c
sa1100_cerf.c
sa1100_generic.c
sa1100_generic.h
sa1100_h3600.c
sa1100_jornada720.c [ARM] 4810/1: - Fix 'section mismatch' building warnings 2008-02-04 13:14:07 +00:00
sa1100_neponset.c
sa1100_shannon.c
sa1100_simpad.c
sa1111_generic.c
sa1111_generic.h
soc_common.c
soc_common.h
socket_sysfs.c
tcic.c pcmcia: replace kio_addr_t with unsigned int everywhere 2008-02-05 09:44:08 -08:00
tcic.h
ti113x.h
topic.h
vg468.h
vrc4171_card.c
vrc4173_cardu.c
vrc4173_cardu.h
yenta_socket.c
yenta_socket.h