diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2008-04-02 13:04:48 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-02 15:28:19 -0700 |
commit | 3d0ae36ea973b42e1c636210433aebef4426c5bf (patch) | |
tree | f0cb248d8ec666e1610dc7e119fa58102e5f8a1b | |
parent | ffc41cf8dbb1b895a87daf47d0e5bf6dfbfcab4c (diff) | |
download | linux-3d0ae36ea973b42e1c636210433aebef4426c5bf.tar.gz linux-3d0ae36ea973b42e1c636210433aebef4426c5bf.tar.bz2 linux-3d0ae36ea973b42e1c636210433aebef4426c5bf.zip |
Char: ip2, fix sparse warnings
Unlock two grabbed locks on some paths.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/char/ip2/i2lib.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/char/ip2/i2lib.c b/drivers/char/ip2/i2lib.c index d6567b32fb5c..9c25320121ef 100644 --- a/drivers/char/ip2/i2lib.c +++ b/drivers/char/ip2/i2lib.c @@ -644,12 +644,12 @@ i2QueueCommands(int type, i2ChanStrPtr pCh, int timeout, int nCommands, // Normal Expected path - We still hold LOCK break; /* from for()- Enough room: goto proceed */ } - } - - ip2trace (CHANN, ITRC_QUEUE, 3, 1, totalsize ); + ip2trace(CHANN, ITRC_QUEUE, 3, 1, totalsize); + WRITE_UNLOCK_IRQRESTORE(lock_var_p, flags); + } else + ip2trace(CHANN, ITRC_QUEUE, 3, 1, totalsize); - // Prepare to wait for buffers to empty - WRITE_UNLOCK_IRQRESTORE(lock_var_p,flags); + /* Prepare to wait for buffers to empty */ serviceOutgoingFifo(pB); // Dump what we got if (timeout == 0) { @@ -1830,6 +1830,8 @@ i2StripFifo(i2eBordStrPtr pB) default: // Neither packet? should be impossible ip2trace (ITRC_NO_PORT, ITRC_SFIFO, 5, 1, PTYPE_OF(pB->i2eLeadoffWord) ); + WRITE_UNLOCK_IRQRESTORE(&pB->read_fifo_spinlock, + bflags); break; } // End of switch on type of packets |