]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ipv6: remove redundant assignment to variable err
authorColin Ian King <colin.king@canonical.com>
Wed, 15 Apr 2020 23:16:30 +0000 (00:16 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Apr 2020 23:20:22 +0000 (16:20 -0700)
The variable err 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>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/seg6.c

index 75421a472d25ac4b2cf8df3959b1ea6ec7547827..4c7e0a27fa9cb588ee43fb81f5b2683271bf1754 100644 (file)
@@ -434,7 +434,7 @@ static struct genl_family seg6_genl_family __ro_after_init = {
 
 int __init seg6_init(void)
 {
-       int err = -ENOMEM;
+       int err;
 
        err = genl_register_family(&seg6_genl_family);
        if (err)