ieee802154: Remove redundant initialization of variable ret
authorColin Ian King <colin.king@canonical.com>
Tue, 7 Sep 2021 10:28:14 +0000 (11:28 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Sep 2021 13:06:08 +0000 (14:06 +0100)
The variable ret is being initialized with a value that is never read, it
is being updated later on. The assignment 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/mac802154/iface.c

index 1cf5ac09edcbcdee6bf8461a06836f4ae219036d..323d3d2d986f8d9f7268753a3bf1823cadb0af2d 100644 (file)
@@ -617,7 +617,7 @@ ieee802154_if_add(struct ieee802154_local *local, const char *name,
 {
        struct net_device *ndev = NULL;
        struct ieee802154_sub_if_data *sdata = NULL;
-       int ret = -ENOMEM;
+       int ret;
 
        ASSERT_RTNL();