[PATCH] staging: dgap: fix smatch warn: missing break in case

Mark Hounschell markh at compro.net
Wed May 21 17:03:09 UTC 2014


This patch fixes an smatch warning about a missing break
in a case statement. 

Signed-off-by: Mark Hounschell <markh at compro.net>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
Tested-by: Mark Hounschell <markh at compro.net>
---
 drivers/staging/dgap/dgap.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
index 8cf0816..aa2d184 100644
--- a/drivers/staging/dgap/dgap.c
+++ b/drivers/staging/dgap/dgap.c
@@ -5508,12 +5508,10 @@ static void dgap_parity_scan(struct channel_t *ch, unsigned char *cbuf,
 		return;
 
 	while (l--) {
+		if (ch->pscan_state > 2)
+			ch->pscan_state = 0;
 		c = *in++;
 		switch (ch->pscan_state) {
-		default:
-			/* reset to sanity and fall through */
-			ch->pscan_state = 0;
-
 		case 0:
 			/* No FF seen yet */
 			if (c == (unsigned char) '\377')
-- 
1.8.4.5



More information about the devel mailing list