Skip to content

Commit 17883cd

Browse files
guixinliu1995martinkpetersen
authored andcommitted
scsi: megaraid_sas: Simplify megasas_update_device_list
Remove unnecessary dcmd_ret check and goto statement. Link: https://lore.kernel.org/r/[email protected] Acked-by: Sumit Saxena <[email protected]> Signed-off-by: Guixin Liu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 9b201b5 commit 17883cd

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

drivers/scsi/megaraid/megaraid_sas_base.c

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8768,33 +8768,26 @@ static
87688768
int megasas_update_device_list(struct megasas_instance *instance,
87698769
int event_type)
87708770
{
8771-
int dcmd_ret = DCMD_SUCCESS;
8771+
int dcmd_ret;
87728772

87738773
if (instance->enable_fw_dev_list) {
8774-
dcmd_ret = megasas_host_device_list_query(instance, false);
8775-
if (dcmd_ret != DCMD_SUCCESS)
8776-
goto out;
8774+
return megasas_host_device_list_query(instance, false);
87778775
} else {
87788776
if (event_type & SCAN_PD_CHANNEL) {
87798777
dcmd_ret = megasas_get_pd_list(instance);
8780-
87818778
if (dcmd_ret != DCMD_SUCCESS)
8782-
goto out;
8779+
return dcmd_ret;
87838780
}
87848781

87858782
if (event_type & SCAN_VD_CHANNEL) {
87868783
if (!instance->requestorId ||
87878784
megasas_get_ld_vf_affiliation(instance, 0)) {
8788-
dcmd_ret = megasas_ld_list_query(instance,
8785+
return megasas_ld_list_query(instance,
87898786
MR_LD_QUERY_TYPE_EXPOSED_TO_HOST);
8790-
if (dcmd_ret != DCMD_SUCCESS)
8791-
goto out;
87928787
}
87938788
}
87948789
}
8795-
8796-
out:
8797-
return dcmd_ret;
8790+
return DCMD_SUCCESS;
87988791
}
87998792

88008793
/**

0 commit comments

Comments
 (0)