]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/isdn/hardware/mISDN: Add missing spin_unlock
authorJulia Lawall <julia@diku.dk>
Wed, 26 May 2010 05:55:10 +0000 (05:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 May 2010 07:18:48 +0000 (00:18 -0700)
commit22615e2181e245e0742a798cf0e910ea76ac5406
tree312f828a60083afa2664d0cfc37115acb1986fd0
parentf4ff1e5d32ef0e702a5f53e628a4deed41b09b5c
drivers/isdn/hardware/mISDN: Add missing spin_unlock

Add a spin_unlock missing on the error path.  The return value of write_reg
seems to be completely ignored, so it seems that the lock should be
released in every case.

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>
drivers/isdn/hardware/mISDN/hfcsusb.c