Skip to content

Commit

Permalink
drivers/pcmcia: Add missing local_irq_restore
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Julia Lawall authored and Dominik Brodowski committed Apr 17, 2010
1 parent 6f4567c commit 42d284b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/pcmcia/db1xxx_ss.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 42d284b

Please sign in to comment.