]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net: ixgbevf: Remove redundant initialization of variable ret_val
authorColin Ian King <colin.king@canonical.com>
Fri, 10 Sep 2021 11:51:00 +0000 (12:51 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 29 Oct 2021 16:42:59 +0000 (09:42 -0700)
The variable ret_val 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: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ixgbevf/vf.c

index 5fc347abab3cb826af891fd6b33fd9296a106a24..d459f5c8e98ff59fd84f1f87b18b74c4f58a69c8 100644 (file)
@@ -66,9 +66,9 @@ static s32 ixgbevf_reset_hw_vf(struct ixgbe_hw *hw)
 {
        struct ixgbe_mbx_info *mbx = &hw->mbx;
        u32 timeout = IXGBE_VF_INIT_TIMEOUT;
-       s32 ret_val = IXGBE_ERR_INVALID_MAC_ADDR;
        u32 msgbuf[IXGBE_VF_PERMADDR_MSG_LEN];
        u8 *addr = (u8 *)(&msgbuf[1]);
+       s32 ret_val;
 
        /* Call adapter stop to disable tx/rx and clear interrupts */
        hw->mac.ops.stop_adapter(hw);