]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
char: esp.c: fix possible double-unlock
authorHarvey Harrison <harvey.harrison@gmail.com>
Wed, 30 Apr 2008 07:53:50 +0000 (00:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Apr 2008 15:29:44 +0000 (08:29 -0700)
commitd3ceb6562bfbe8f27fa32d1e24eea0e2d4de0347
tree25a213062b9dd40361984a83f7b2c16a5e5edf8c
parentf5592268a5aa5e02f36f396de47c94a1506e3678
char: esp.c: fix possible double-unlock

Hitting either of the break statements in the while loop would cause a
double-unlock of info->lock.

[Jiri Slaby suggested simply returning is safe here, rather than a goto]

Noticed by sparse:
drivers/char/esp.c:2042:2: warning: context imbalance in 'rs_wait_until_sent' - unexpected unlock

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/esp.c