staging: comedi: usbdux: tidy up usbdux_ao_cmd()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 25 Jul 2013 23:05:35 +0000 (16:05 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2013 22:09:55 +0000 (15:09 -0700)
commit2a226948081f6285ddc7e8fd4c592d7378c7c55d
treebec3cddf0ade508ce19da690b439671e3311fc79
parentf994282df674e31574291e2f8cbd986f234d9d91
staging: comedi: usbdux: tidy up usbdux_ao_cmd()

Rename the local variable used for the private data pointer to the
comedi "norm".

Remove the unnecessary sanity check of the private data pointer. This
function can only be called is the private data was allocated during
the attach.

Make sure an ao command is not already running and return -EBUSY.

Tidy up the exit path using goto to ensure that the semaphore is
released.

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/usbdux.c