]> git.baikalelectronics.ru Git - kernel.git/commit
sx.c: fix missed unlock_kernel() on error path in sx_fw_ioctl()
authorDan Carpenter <error27@gmail.com>
Wed, 4 Feb 2009 23:12:20 +0000 (15:12 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 5 Feb 2009 20:56:48 +0000 (12:56 -0800)
commitcd9a86fc7331616498ee2f2b0bc33aa1a613a941
tree83fbdc15a5ad032e47c9d237617a67866303767b
parent9eaad1b8db5b627be8a879e7f205abee53a3c245
sx.c: fix missed unlock_kernel() on error path in sx_fw_ioctl()

If we return directly with -EPERM then lock_kernel() is still held.

This was found with a code checker (http://repo.or.cz/w/smatch.git/).

[akpm@linux-foundation.org: fix another such path - missed func_exit()]
Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: <R.E.Wolff@BitWizard.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/sx.c