Skip to content

Commit 3d0ae36

Browse files
jirislabytorvalds
authored andcommitted
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>
1 parent ffc41cf commit 3d0ae36

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

‎drivers/char/ip2/i2lib.c‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -644,12 +644,12 @@ i2QueueCommands(int type, i2ChanStrPtr pCh, int timeout, int nCommands,
644644
// Normal Expected path - We still hold LOCK
645645
break; /* from for()- Enough room: goto proceed */
646646
}
647-
}
648-
649-
ip2trace (CHANN, ITRC_QUEUE, 3, 1, totalsize );
647+
ip2trace(CHANN, ITRC_QUEUE, 3, 1, totalsize);
648+
WRITE_UNLOCK_IRQRESTORE(lock_var_p, flags);
649+
} else
650+
ip2trace(CHANN, ITRC_QUEUE, 3, 1, totalsize);
650651

651-
// Prepare to wait for buffers to empty
652-
WRITE_UNLOCK_IRQRESTORE(lock_var_p,flags);
652+
/* Prepare to wait for buffers to empty */
653653
serviceOutgoingFifo(pB); // Dump what we got
654654

655655
if (timeout == 0) {
@@ -1830,6 +1830,8 @@ i2StripFifo(i2eBordStrPtr pB)
18301830
default: // Neither packet? should be impossible
18311831
ip2trace (ITRC_NO_PORT, ITRC_SFIFO, 5, 1,
18321832
PTYPE_OF(pB->i2eLeadoffWord) );
1833+
WRITE_UNLOCK_IRQRESTORE(&pB->read_fifo_spinlock,
1834+
bflags);
18331835

18341836
break;
18351837
} // End of switch on type of packets

0 commit comments

Comments
 (0)