diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-04-25 11:43:07 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-04-25 14:12:06 -0400 |
commit | 6f5d295909c9e10a715c4f9f6301ffa701398112 (patch) | |
tree | d5afa6afd251d6678b972fd3bc8e2cf79a56e2e4 /drivers/net/hamradio | |
parent | 4d7b44833e9a129d3220152727a19cceea3a2ac4 (diff) | |
download | linux-6f5d295909c9e10a715c4f9f6301ffa701398112.tar.bz2 |
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>
Diffstat (limited to 'drivers/net/hamradio')
-rw-r--r-- | drivers/net/hamradio/mkiss.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c index c180b480f8ef..13e4c1eff353 100644 --- a/drivers/net/hamradio/mkiss.c +++ b/drivers/net/hamradio/mkiss.c @@ -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--; |