diff options
author | Julia Lawall <julia@diku.dk> | 2008-12-21 21:54:45 +0100 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2008-12-30 11:35:30 -0600 |
commit | 870029a682d468585a80ce782871f3f220cfef0f (patch) | |
tree | bd70e6d220408fc7e7480fa0b31a3d00992ee65f /arch/powerpc/platforms | |
parent | 8bd3947afda14625bff8c067b760840abfb51358 (diff) | |
download | blackbird-op-linux-870029a682d468585a80ce782871f3f220cfef0f.tar.gz blackbird-op-linux-870029a682d468585a80ce782871f3f220cfef0f.zip |
powerpc/85xx: Add local_irq_restore in error handling code
There is a call to local_irq_restore in the normal exit case, so it would
seem that there should be one on an error return as well.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@@
expression l;
expression E,E1,E2;
@@
local_irq_save(l);
... when != local_irq_restore(l)
when != spin_unlock_irqrestore(E,l)
when any
when strict
(
if (...) { ... when != local_irq_restore(l)
when != spin_unlock_irqrestore(E1,l)
+ local_irq_restore(l);
return ...;
}
|
if (...)
+ {local_irq_restore(l);
return ...;
+ }
|
spin_unlock_irqrestore(E2,l);
|
local_irq_restore(l);
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/85xx/smp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c index d652c713f496..79a0df17078b 100644 --- a/arch/powerpc/platforms/85xx/smp.c +++ b/arch/powerpc/platforms/85xx/smp.c @@ -58,6 +58,7 @@ smp_85xx_kick_cpu(int nr) if (cpu_rel_addr == NULL) { printk(KERN_ERR "No cpu-release-addr for cpu %d\n", nr); + local_irq_restore(flags); return; } |