mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-10 02:29:01 +00:00
staging: comedi: ni_660x: fix missing break in switch statement
commit479826cc86
upstream. Add missing break statement in order to prevent the code from falling through to the default case and return -EINVAL every time. This bug was found thanks to the ongoing efforts to enable -Wimplicit-fallthrough. Fixes:aa94f28888
("staging: comedi: ni_660x: tidy up ni_660x_set_pfi_routing()") Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
40245f2413
commit
63efda29f3
1 changed files with 1 additions and 0 deletions
|
@ -602,6 +602,7 @@ static int ni_660x_set_pfi_routing(struct comedi_device *dev,
|
||||||
case NI_660X_PFI_OUTPUT_DIO:
|
case NI_660X_PFI_OUTPUT_DIO:
|
||||||
if (chan > 31)
|
if (chan > 31)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue