staging: comedi: ni_tio: validate clock source
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 23 Mar 2016 22:37:00 +0000 (15:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Mar 2016 14:30:36 +0000 (07:30 -0700)
commitd87f5e90585a8b8646c3e9fe92d4c47716f5e19d
tree17cea8f1777d8d17d6f4c9231ba1de488fde2385
parenta19b9b476ae3612e6c61c60e7fad7c8974158ef9
staging: comedi: ni_tio: validate clock source

Refactor the functions that determine the clock source bits so that they
return -EINVAL if the clock source is invalid. Pass the errno back to
ni_tio_insn_config().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_tio.c