mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 3/12] drivers/char/amiserial.c: Add missing local_irq_restore
@ 2010-03-29 15:34 Julia Lawall
  2010-04-01 19:51 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2010-03-29 15:34 UTC (permalink / raw)
  To: linux-kernel, kernel-janitors

From: Julia Lawall <julia@diku.dk>

Add local_irq_restore after the labels that can be reached after a
local_irq_save.

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

// <smpl>
@r exists@
expression E1;
identifier f;
@@

f (...) { <+...
* local_irq_save (E1,...);
... when != E1
* return ...;
...+> }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>

---
 drivers/char/amiserial.c            |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/char/amiserial.c b/drivers/char/amiserial.c
index 6c32fbf..2131ecb 100644
--- a/drivers/char/amiserial.c
+++ b/drivers/char/amiserial.c
@@ -2056,6 +2056,7 @@ fail_free_irq:
 	free_irq(IRQ_AMIGA_TBE, state);
 fail_unregister:
 	tty_unregister_driver(serial_driver);
+	local_irq_restore(flags);
 fail_release_mem_region:
 	release_mem_region(CUSTOM_PHYSADDR+0x30, 4);
 fail_put_tty_driver:

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-01 19:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-29 15:34 [PATCH 3/12] drivers/char/amiserial.c: Add missing local_irq_restore Julia Lawall
2010-04-01 19:51 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome