]> www.infradead.org Git - users/hch/misc.git/commitdiff
qed: remove redundant assignment to variable 'rc'
authorColin Ian King <colin.king@canonical.com>
Sun, 5 Apr 2020 13:49:14 +0000 (14:49 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Apr 2020 17:22:09 +0000 (10:22 -0700)
The variable 'rc' is being assigned a value that is never read
and it is being updated later with a new value. 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>
drivers/net/ethernet/qlogic/qed/qed_l2.c

index 1a5fc2ae351c424de2b6b0d5deea876267273291..29810a1aa21060b4eb4059228f78225c50a6bdde 100644 (file)
@@ -369,8 +369,8 @@ int qed_sp_eth_vport_start(struct qed_hwfn *p_hwfn,
        struct qed_spq_entry *p_ent =  NULL;
        struct qed_sp_init_data init_data;
        u8 abs_vport_id = 0;
-       int rc = -EINVAL;
        u16 rx_mode = 0;
+       int rc;
 
        rc = qed_fw_vport(p_hwfn, p_params->vport_id, &abs_vport_id);
        if (rc)