drivers/pcmcia: Add missing local_irq_restore
authorJulia Lawall <julia@diku.dk>
Mon, 29 Mar 2010 15:35:24 +0000 (17:35 +0200)
committerDominik Brodowski <linux@dominikbrodowski.net>
Sat, 17 Apr 2010 15:54:38 +0000 (17:54 +0200)
Use local_irq_restore in this error-handling case just like in the one just
below.

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>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
drivers/pcmcia/db1xxx_ss.c

index 6206408e196cd9c2f0332fb89283c53368ce7811..2d48196a48cd4226bcac88c1d42bcf2c309d2939 100644 (file)
@@ -166,8 +166,10 @@ static int db1x_pcmcia_setup_irqs(struct db1x_pcmcia_sock *sock)
 
                ret = request_irq(sock->insert_irq, db1200_pcmcia_cdirq,
                                  IRQF_DISABLED, "pcmcia_insert", sock);
-               if (ret)
+               if (ret) {
+                       local_irq_restore(flags);
                        goto out1;
+               }
 
                ret = request_irq(sock->eject_irq, db1200_pcmcia_cdirq,
                                  IRQF_DISABLED, "pcmcia_eject", sock);