powerpc/vio: Add missing unlock in error path
authorJulia Lawall <julia@diku.dk>
Mon, 29 Mar 2010 05:33:34 +0000 (05:33 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 7 Apr 2010 08:00:43 +0000 (18:00 +1000)
commitf6d8c8bb1d360272d795927d39f3d2c5934e77d9
treeda15e76aa8e9135fed852f26a7d0161a73c7f202
parent43caa61f154da85a620965f3f61c2f45366d8dc7
powerpc/vio: Add missing unlock in error path

Add an unlock before exiting the function.

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 (...) { <+...
* spin_lock_irq (E1,...);
... when != E1
* return ...;
...+> }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/vio.c