staging/easycap: fix mismatch in easycap_poll() mutex lock-unlock
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Mon, 29 Aug 2011 17:46:57 +0000 (21:46 +0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 29 Aug 2011 18:20:11 +0000 (11:20 -0700)
commit22f88fcf407933321d08c45520fbeffca70b05d1
tree8f419f5ca814b09e95b7eaff8ea5d070946957e5
parent0f18f767e5f9a4c5a9fa976df168d0f3e33c91da
staging/easycap: fix mismatch in easycap_poll() mutex lock-unlock

In case if condition (kd != isdongle(peasycap)) becomes true,
easycap_poll() returns without releasing easycapdc60_dongle[kd].mutex_video.
The patch adds mutex_unlock() before that return.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/easycap/easycap_main.c