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>
unsigned int aref0 = CR_AREF(cmd->chanlist[0]);
int i;
- if (mode == MODE_SINGLE_CHAN)
- return 0;
-
for (i = 0; i < cmd->chanlist_len; i++) {
unsigned int chan = CR_CHAN(cmd->chanlist[i]);
unsigned int range = CR_RANGE(cmd->chanlist[i]);