Skip to content

Commit 6f5d295

Browse files
Colin Ian Kingdavem330
authored andcommitted
mkiss: remove redundant check for len > 0
The check for len > 0 is always true and hence is redundant as this check is already being made to execute the code inside the while-loop. Hence it is redundant and can be removed. Cleans up cppcheck warning: drivers/net/hamradio/mkiss.c:220: (warning) Identical inner 'if' condition is always true. Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 4d7b448 commit 6f5d295

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/hamradio/mkiss.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ static int kiss_esc_crc(unsigned char *s, unsigned char *d, unsigned short crc,
217217
c = *s++;
218218
else if (len > 1)
219219
c = crc >> 8;
220-
else if (len > 0)
220+
else
221221
c = crc & 0xff;
222222

223223
len--;

0 commit comments

Comments
 (0)