upstream: [media] gspca_kinect: fix kinect_read() error path
authorAntonio Ospite <ospite@studenti.unina.it>
Mon, 30 Dec 2013 16:41:45 +0000 (13:41 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:54:45 +0000 (11:54 +0900)
commitd6de5ba9167ebdcf56403e85b4f896bcb771aeef
tree6a1cd169a4ceb5592431979e96af7063e52b2f0c
parentd839e91b004a7603c027ef3abe969b6943cf7884
upstream: [media] gspca_kinect: fix kinect_read() error path

The error checking code relative to the invocations of kinect_read()
does not return the actual return code of the function just called, it
returns "res" which still contains the value of the last invocation of
a previous kinect_write().

Return the proper value, and while at it also report with -EREMOTEIO the
case of a partial transfer.

Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/gspca/kinect.c