staging: gdm724x: remove redundant assignment to pointer 'w'
authorColin Ian King <colin.king@canonical.com>
Sun, 5 Apr 2020 13:06:19 +0000 (14:06 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Apr 2020 06:55:31 +0000 (08:55 +0200)
The pointer 'w' is being initialized with a value that is never read
and it is being updated later with a new value. The initialization
is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20200405130619.377043-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gdm724x/gdm_lte.c

index 354727f..eb30919 100644 (file)
@@ -172,7 +172,7 @@ static int gdm_lte_emulate_arp(struct sk_buff *skb_in, u32 nic_type)
 
 static __sum16 icmp6_checksum(struct ipv6hdr *ipv6, u16 *ptr, int len)
 {
-       unsigned short *w = ptr;
+       unsigned short *w;
        __wsum sum = 0;
        int i;
        u16 pa;