staging: comedi: ni_tiocmd: tidy up ni_tio_input_cmd()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 28 Jul 2014 17:27:03 +0000 (10:27 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Jul 2014 23:51:01 +0000 (16:51 -0700)
commit4cf2f3a5745f4fbcd9eb80e3bb1406be6d95cf26
treeb8d91a8b1b5b16b54821521d92f268c5a8f4620e
parent78c7a4a6592cde3e2ecba1732727d3ed3866a653
staging: comedi: ni_tiocmd: tidy up ni_tio_input_cmd()

The cmd->start_src is validated in the (*do_cmdtest) before this
function is called. All valid trigger sources are handled so the
default BUG() case can never occure.

For aesthetics, refactor the switch into if/else tests and remove
the BUG().

For aesthetics, rename the local variable 'retval' to simply 'ret'.

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_tiocmd.c