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: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>