]> git.baikalelectronics.ru Git - kernel.git/commit
net/iucv: Add missing spin_unlock
authorJulia Lawall <julia@diku.dk>
Wed, 26 May 2010 05:56:48 +0000 (05:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 May 2010 04:09:51 +0000 (21:09 -0700)
commitd757c70c4d8da927345b96458d52995d2fb7002d
tree96ff391bccbc702cf2c9d74eecb055c32fb59a49
parent77ff44a61a76047bfe820c9fe51abe2b7699d9ce
net/iucv: Add missing spin_unlock

Add a spin_unlock missing on the error path.  There seems like no reason
why the lock should continue to be held if the kzalloc fail.

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: David S. Miller <davem@davemloft.net>
net/iucv/af_iucv.c