OpenCloudOS-Kernel/drivers/staging
Ian Abbott 28a60c456b staging: comedi: check for more errors for zero-length write
If the "write" file operation handler, `comedi_write()` is passed 0 for
the amount to write, some error conditions are currently skipped and the
function just returns 0.  Change it to check those error conditions and
return an error value if appropriate.  The trickiest case is the check
for when the previously set up asynchronous command has terminated with
an error.  In that case, `-EPIPE` is returned (as it is for a write of
non-zero length) and the subdevice gets marked as non-busy.

A zero-length write that returns 0 has no other effects, in particular,
it does not cause the subdevice to be marked as non-busy.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:58:54 -08:00
..
android android: unconditionally remove callbacks in sync_fence_free() 2015-12-21 13:37:53 -08:00
board staging: board: Set PM domain before probe 2015-10-29 09:05:57 +09:00
clocking-wizard
comedi staging: comedi: check for more errors for zero-length write 2015-12-21 15:58:54 -08:00
dgap staging: dgap: add spaces around binary operator '|' 2015-10-24 19:33:42 -07:00
dgnc staging: dgnc: dgnc_cls.c: Replaced udelay by usleep_range 2015-12-21 15:52:34 -08:00
emxx_udc Staging: emxx_udc: Add space around operator. 2015-10-24 19:21:05 -07:00
fbtft spi: Updates for v4.4 2015-11-05 13:15:12 -08:00
fsl-mc staging: fsl-mc: section mismatch bug fix 2015-10-27 14:40:14 +09:00
fwserial Staging: fwserial: Declare fwtty_port_put as static 2015-11-15 20:02:47 -08:00
gdm72xx staging: gdm72xx:Add space around '<<' 2015-11-15 20:02:47 -08:00
gdm724x staging: gdm724x: Remove wrapper function 2015-11-15 20:02:47 -08:00
goldfish
gs_fpgaboot
iio staging:iio:mxs-lradc Fix large integer implicitly truncated to unsigned warning 2015-12-02 14:06:11 -08:00
lustre staging: lustre: Fix a jump label position in osc_get_info() 2015-12-21 15:49:06 -08:00
media staging: media: bcm2048: fix mispelling 2015-11-15 20:02:47 -08:00
most staging: most: Delete an unnecessary check before the function call "module_put" 2015-11-15 20:02:47 -08:00
mt29f_spinand MTD updates for 4.4-rc1: 2015-11-06 11:50:24 -08:00
netlogic staging: netlogic: Do not use multiple blank lines. 2015-10-24 19:38:48 -07:00
nvec staging: nvec: Add space around '<<' 2015-11-15 20:02:47 -08:00
octeon staging: octeon: Add space around '+' 2015-11-15 20:02:47 -08:00
octeon-usb staging: octeon-usb: Replace kmalloc with kmalloc_array 2015-10-24 19:28:52 -07:00
olpc_dcon Staging: olpc_dcon: Remove NULL comparison 2015-10-16 23:06:38 -07:00
panel Staging: panel: Logical continuations should be on the previous line 2015-10-29 07:55:17 +09:00
rdma staging/rdma/hfi1: Fix module parameter spelling 2015-12-21 14:01:14 -08:00
rtl8188eu staging: rtl8188eu: goto removed 2015-11-15 20:02:47 -08:00
rtl8192e staging: rtl8192e: Remove unnecessary variable 2015-11-15 20:02:47 -08:00
rtl8192u staging: rtl8192u: Remove unnecessary function 2015-11-15 20:02:47 -08:00
rtl8712 staging: rtl8712: rtl871x_mlme: Remove wrapper function 2015-11-15 20:02:47 -08:00
rtl8723au Staging: rtl8723au: Declare function static 2015-11-15 20:02:47 -08:00
rts5208 Staging: rts5208: use dmam_alloc_coherent 2015-10-16 23:17:26 -07:00
skein skein: fix coding style 2015-10-24 19:30:12 -07:00
slicoss staging: slicoss: Fixes block comment style 2015-10-27 14:43:31 +09:00
sm750fb Staging: sm750fb: Remove unused modedb.h file 2015-11-15 20:02:47 -08:00
speakup Staging driver update for 4.4-rc1 2015-11-04 21:40:53 -08:00
ste_rmi4
unisys staging: unisys: better config switch comments 2015-11-25 08:42:14 -08:00
vme drivers: staging: vme: Deleted casting to (void *) 2015-11-24 15:30:50 -08:00
vt6655 staging: vt6655: Add space around '*' 2015-10-24 19:38:48 -07:00
vt6656 staging: vt6656: remove address from GPL text 2015-11-19 16:53:09 -08:00
wilc1000 staging: wilc1000: bug fix on memory free 2015-12-21 13:21:09 -08:00
wlan-ng Staging: wlan-ng: Remove unused function declaration 2015-11-15 20:02:47 -08:00
xgifb Staging: xgifb: Remove space after cast 2015-10-24 19:11:30 -07:00
Kconfig staging: ft1000: remove obsolete driver 2015-10-24 19:19:43 -07:00
Makefile staging: ft1000: remove obsolete driver 2015-10-24 19:19:43 -07:00
staging.c