Skip to content
Commit 57c563bf authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman
Browse files

staging: comedi: COMEDI_BUFINFO: return error if no active command



The `COMEDI_BUFINFO` ioctl is used to advance the current position in
the buffer and/or get the current buffer position.  If no asynchronous
command is active (started via the file object that issued this ioctl),
this information is meaningless.  Change it to return an error
(`-EINVAL`) in this case.  Prior to this change, if a command was
started via a different file object, the ioctl returned `-EACCES`, but
now it will return `-EINVAL`, which is consistent with the current
behavior of the "read" and "write" file operation handlers.

Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bb0c6bfa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment