]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
staging: comedi: ni_labpc_common: fix logically dead code issue
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 20 Feb 2015 19:52:26 +0000 (12:52 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Mar 2015 02:47:39 +0000 (18:47 -0800)
commit4f456c8034ad993eb6908b8a53216bca7afe9f1f
tree6a25a6bbd81a65f37a930128e6b038449df4d144
parentcb6ec7f6f5f7506dddc6bba9c204e2dab6dc07c0
staging: comedi: ni_labpc_common: fix logically dead code issue

The quick exit check of (mode == MODE_SINGLE_CHAN) results in coverity
reporting a logically dead code issue in the switch code in
labpc_ai_check_chanlist().

Remove the quick exit check and allow the function to handle the
MODE_SINGLE_CHAN normally (the for loop will only happen 1 time and
the function will return 0).

Reported-by: coverity (CID 1222108)
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_labpc_common.c