aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hamradio
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2018-04-25 11:43:07 +0100
committerDavid S. Miller <davem@davemloft.net>2018-04-25 14:12:06 -0400
commit6f5d295909c9e10a715c4f9f6301ffa701398112 (patch)
treed5afa6afd251d6678b972fd3bc8e2cf79a56e2e4 /drivers/net/hamradio
parentnet: amd8111e: remove redundant duplicated if statement (diff)
downloadlinux-dev-6f5d295909c9e10a715c4f9f6301ffa701398112.tar.xz
linux-dev-6f5d295909c9e10a715c4f9f6301ffa701398112.zip
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.c2
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--;