net: mana: remove redundant initialization of variable err
authorColin Ian King <colin.king@canonical.com>
Tue, 20 Apr 2021 12:27:30 +0000 (13:27 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Apr 2021 00:05:19 +0000 (17:05 -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>
drivers/net/ethernet/microsoft/mana/hw_channel.c

index 462bc57..0cf0322 100644 (file)
@@ -55,7 +55,7 @@ static void mana_hwc_handle_resp(struct hw_channel_context *hwc, u32 resp_len,
                                 const struct gdma_resp_hdr *resp_msg)
 {
        struct hwc_caller_ctx *ctx;
-       int err = -EPROTO;
+       int err;
 
        if (!test_bit(resp_msg->response.hwc_msg_id,
                      hwc->inflight_msg_res.map)) {