[media] gspca_main: Update buffer flags even when user_copy fails
authorHans de Goede <hdegoede@redhat.com>
Thu, 30 Dec 2010 23:00:17 +0000 (20:00 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 19 Jan 2011 13:44:55 +0000 (11:44 -0200)
commit4a82bc60a9abbfca0c899366ff30c592e8020520
tree3821b98f8a5b92d09b56f448ea33e195e19cbeeb
parent27074efa2ee8c1ef07dc5f644104e35d39e43322
[media] gspca_main: Update buffer flags even when user_copy fails

Before this patch dqbuf errors out on a failing user_copy (with user pointers)
before updating the buffer flags, causing a successsfully dequeued buffer
to still have the DONE flag, which means that it could no longer be
re-queueud (assuming the app somehow survives the segfault).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/gspca.c