]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arch/x86/kernel: Add missing spin_unlock
authorJulia Lawall <julia@diku.dk>
Thu, 27 May 2010 10:31:51 +0000 (12:31 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:22:43 +0000 (11:22 -0700)
commit2b2a3d8b7c699174a642bcbad080767894ce3db2
treee5d4d8191fa3dc0c490da76f210df0f07a7eb5ca
parentec883a3709b76f16853c29e9fc19c699e582a692
arch/x86/kernel: Add missing spin_unlock

commit 84fe6c19e4a598e8071e3bd1b2c923454eae1268 upstream.

Add a spin_unlock missing on the error path.  The locks and unlocks are
balanced in other functions, so it seems that the same should be the case
here.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression E1;
@@

* spin_lock(E1,...);
  <+... when != E1
  if (...) {
    ... when != E1
*   return ...;
  }
  ...+>
* spin_unlock(E1,...);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kernel/amd_iommu.c