[media] gspca: fix dev_open() error path
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Mon, 5 Aug 2013 20:16:37 +0000 (17:16 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Wed, 21 Aug 2013 08:18:31 +0000 (05:18 -0300)
commitb563a0d049143a98411b6a45745186daf443d587
treecc88fa5a053f842101d0afb855e630fee1f43a4b
parent6c94e14e7f802011afc1018fc8529e66f40866b9
[media] gspca: fix dev_open() error path

If v4l2_fh_open() fails in dev_open(), gspca_dev->module left locked.
The patch adds module_put(gspca_dev->module) on this path.
Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/gspca/gspca.c