mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-22 12:14:01 +08:00
scsi: lpfc: remove useless code in lpfc_sli4_bsg_link_diag_test
Remove variable assignments. The value stored in local variable _rc_ is overwritten at line 2448:rc = lpfc_sli4_bsg_set_link_diag_state(phba, 0); before it can be used. Addresses-Coverity-ID: 1226935 Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Acked-by: James Smart <james.smart@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
6a8dadcca8
commit
44ed33e6c5
@ -2384,20 +2384,17 @@ lpfc_sli4_bsg_link_diag_test(struct bsg_job *job)
|
|||||||
goto job_error;
|
goto job_error;
|
||||||
|
|
||||||
pmboxq = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
|
pmboxq = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
|
||||||
if (!pmboxq) {
|
if (!pmboxq)
|
||||||
rc = -ENOMEM;
|
|
||||||
goto link_diag_test_exit;
|
goto link_diag_test_exit;
|
||||||
}
|
|
||||||
|
|
||||||
req_len = (sizeof(struct lpfc_mbx_set_link_diag_state) -
|
req_len = (sizeof(struct lpfc_mbx_set_link_diag_state) -
|
||||||
sizeof(struct lpfc_sli4_cfg_mhdr));
|
sizeof(struct lpfc_sli4_cfg_mhdr));
|
||||||
alloc_len = lpfc_sli4_config(phba, pmboxq, LPFC_MBOX_SUBSYSTEM_FCOE,
|
alloc_len = lpfc_sli4_config(phba, pmboxq, LPFC_MBOX_SUBSYSTEM_FCOE,
|
||||||
LPFC_MBOX_OPCODE_FCOE_LINK_DIAG_STATE,
|
LPFC_MBOX_OPCODE_FCOE_LINK_DIAG_STATE,
|
||||||
req_len, LPFC_SLI4_MBX_EMBED);
|
req_len, LPFC_SLI4_MBX_EMBED);
|
||||||
if (alloc_len != req_len) {
|
if (alloc_len != req_len)
|
||||||
rc = -ENOMEM;
|
|
||||||
goto link_diag_test_exit;
|
goto link_diag_test_exit;
|
||||||
}
|
|
||||||
run_link_diag_test = &pmboxq->u.mqe.un.link_diag_test;
|
run_link_diag_test = &pmboxq->u.mqe.un.link_diag_test;
|
||||||
bf_set(lpfc_mbx_run_diag_test_link_num, &run_link_diag_test->u.req,
|
bf_set(lpfc_mbx_run_diag_test_link_num, &run_link_diag_test->u.req,
|
||||||
phba->sli4_hba.lnk_info.lnk_no);
|
phba->sli4_hba.lnk_info.lnk_no);
|
||||||
|
Loading…
Reference in New Issue
Block a user