]> git.baikalelectronics.ru Git - kernel.git/commit
Staging: lirc, fix lock imbalance
authorJiri Slaby <jslaby@suse.cz>
Sat, 4 Sep 2010 12:16:26 +0000 (14:16 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 5 Sep 2010 04:26:06 +0000 (21:26 -0700)
commit9013de2525e1c7f1ccf8b198b476be361d70ba05
tree5cd637770bcc5f7e795c4f36b027999045695730
parent57944787872d97f2e944c8aac65e11f268fe7e9b
Staging: lirc, fix lock imbalance

[2nd version -- melded all three together]

1) There is a missing return or goto statement in one fail path in
sasem_probe, so that the code contiues its normal execution (and
unlocks a mutex twice). Fix that by jumping to the right place.

Anyway the code is very broken on its fail paths and there are many
leaks. But that's a different story.

2) There is an omitted unlock in one fail path in vfd_write, jump to
the right place to unlock the lock.

3) In the probe function, there is one more error where the lock is
not unlocked. Fix that by jumping to the proper place.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Jarod Wilson <jarod@redhat.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/lirc/lirc_sasem.c