arch/arm/mach-omap1/dma.c: Invert calls to platform_device_put and platform_device_del
authorJulia Lawall <julia@diku.dk>
Fri, 13 May 2011 16:46:10 +0000 (18:46 +0200)
committerTony Lindgren <tony@atomide.com>
Wed, 1 Jun 2011 09:25:04 +0000 (02:25 -0700)
Platform_device_del should be called before platform_device_put, as
platform_device_put can delete the structure.

Additionally, improve the error handling code for the call to ioremap, so
that it calls platform_device_put.

The semantic match that finds this problem is:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e1,e2;
@@

*platform_device_put(e1);
... when != e1 = e2
*platform_device_del(e1);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Tony Lindgren <tony@atomide.com>

No differences found