Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

qed: remove redundant assignments to rc

The variable rc is assigned with a value that is never read and
it is re-assigned a new value later on. The assignment is redundant
and can be removed. Clean up multiple occurrances of this pattern.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Colin Ian King and committed by
David S. Miller
e70ac628 718eae27

+5 -5
+5 -5
drivers/net/ethernet/qlogic/qed/qed_sp_commands.c
··· 331 331 u8 sb_index = p_hwfn->p_eq->eq_sb_index; 332 332 struct qed_spq_entry *p_ent = NULL; 333 333 struct qed_sp_init_data init_data; 334 - int rc = -EINVAL; 335 334 u8 page_cnt, i; 335 + int rc; 336 336 337 337 /* update initial eq producer */ 338 338 qed_eq_prod_update(p_hwfn, ··· 447 447 { 448 448 struct qed_spq_entry *p_ent = NULL; 449 449 struct qed_sp_init_data init_data; 450 - int rc = -EINVAL; 450 + int rc; 451 451 452 452 /* Get SPQ entry */ 453 453 memset(&init_data, 0, sizeof(init_data)); ··· 471 471 { 472 472 struct qed_spq_entry *p_ent = NULL; 473 473 struct qed_sp_init_data init_data; 474 - int rc = -EOPNOTSUPP; 474 + int rc; 475 475 476 476 if (p_hwfn->ufp_info.pri_type == QED_UFP_PRI_UNKNOWN) { 477 477 DP_INFO(p_hwfn, "Invalid priority type %d\n", ··· 509 509 { 510 510 struct qed_spq_entry *p_ent = NULL; 511 511 struct qed_sp_init_data init_data; 512 - int rc = -EINVAL; 512 + int rc; 513 513 514 514 if (IS_VF(p_hwfn->cdev)) 515 515 return qed_vf_pf_tunnel_param_update(p_hwfn, p_tunn); ··· 546 546 { 547 547 struct qed_spq_entry *p_ent = NULL; 548 548 struct qed_sp_init_data init_data; 549 - int rc = -EINVAL; 549 + int rc; 550 550 551 551 /* Get SPQ entry */ 552 552 memset(&init_data, 0, sizeof(init_data));