Julia Lawall c70c036f04 drivers/char/amiserial.c: add missing local_irq_restore
rs_init() is failing to restore interrupts on two error paths, and is
incorrectly calling tty_unregister_driver() with local interrupts
disabled.

Fix these things by disabling interrupts later, after the reauest_irq()
calls.

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>

[akpm@linux-foundation.org: reimplement the fix]
Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-04-07 08:38:02 -07:00
..
2009-09-24 07:21:03 -07:00
2010-02-09 11:13:56 +01:00
2009-10-04 15:05:10 -07:00
2009-12-10 22:55:36 +01:00
2009-12-11 15:18:03 -08:00
2010-03-12 15:52:35 -08:00
2009-10-14 17:36:53 +02:00
2010-01-04 12:31:21 -08:00
2010-03-02 14:43:22 -08:00
2010-02-09 11:13:56 +01:00