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 <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Colin Ian King 2018-04-25 11:43:07 +01:00 committed by David S. Miller
parent 4d7b44833e
commit 6f5d295909
1 changed files with 1 additions and 1 deletions

View File

@ -217,7 +217,7 @@ static int kiss_esc_crc(unsigned char *s, unsigned char *d, unsigned short crc,
c = *s++;
else if (len > 1)
c = crc >> 8;
else if (len > 0)
else
c = crc & 0xff;
len--;