]> git.baikalelectronics.ru Git - kernel.git/commit
[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)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 28 Feb 2014 17:37:04 +0000 (14:37 -0300)
commit89dba4ed9c5ea33c280a5e554e9a7f2e4243fc4c
tree2c906b0e6471582d63193191cc05d3629e78a4f6
parent554e2349e38ec873f906160cec6d989c0dded76c
[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