[lkml]   [2019]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 5.0 12/46] staging: comedi: ni_660x: fix missing break in switch statement
5.0-stable review patch.  If anyone has any objections, please let me know.


From: Gustavo A. R. Silva <>

commit 479826cc86118e0d87e5cefb3df5b748e0480924 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

Fixes: aa94f2888825 ("staging: comedi: ni_660x: tidy up ni_660x_set_pfi_routing()")
Signed-off-by: Gustavo A. R. Silva <>
Reviewed-by: Ian Abbott <>
Signed-off-by: Greg Kroah-Hartman <>

drivers/staging/comedi/drivers/ni_660x.c | 1 +
1 file changed, 1 insertion(+)

--- a/drivers/staging/comedi/drivers/ni_660x.c
+++ b/drivers/staging/comedi/drivers/ni_660x.c
@@ -656,6 +656,7 @@ static int ni_660x_set_pfi_routing(struc
if (chan > 31)
return -EINVAL;
+ break;
return -EINVAL;

 \ /
  Last update: 2019-03-08 14:10    [W:0.175 / U:8.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site