mkiss: remove redundant assignment of len to ax->mtu
authorColin Ian King <colin.king@canonical.com>
Sun, 29 Oct 2017 13:30:25 +0000 (13:30 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 Nov 2017 03:09:45 +0000 (12:09 +0900)
Variable len is being assigned a value that is never read,
hence the assignment is redundant and can be removed. Cleans
up clang warning:

drivers/net/hamradio/mkiss.c:443:3: warning: Value stored to
'len' is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hamradio/mkiss.c

index 54bf8e6e4a090ce912dc821f6cc16ede0ffa659b..c180b480f8ef519ee3af35d9ecaf36a867c042d3 100644 (file)
@@ -440,7 +440,6 @@ static void ax_encaps(struct net_device *dev, unsigned char *icp, int len)
                ax_changedmtu(ax);
 
        if (len > ax->mtu) {            /* Sigh, shouldn't occur BUT ... */
-               len = ax->mtu;
                printk(KERN_ERR "mkiss: %s: truncating oversized transmit packet!\n", ax->dev->name);
                dev->stats.tx_dropped++;
                netif_start_queue(dev);