From: Matthias Beyer Date: Tue, 15 Jul 2014 07:43:10 +0000 (+0200) Subject: Staging: bcm: PHSModule.c: Simplified nested if statements by linking them with logic... X-Git-Tag: firefly_0821_release~176^2~3491^2~757 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c842dd2ddb888d64ad50387d36f93a5225cb0a9b;p=firefly-linux-kernel-4.4.55.git Staging: bcm: PHSModule.c: Simplified nested if statements by linking them with logical AND in GetServiceFlowEntry() Signed-off-by: Matthias Beyer Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/bcm/PHSModule.c b/drivers/staging/bcm/PHSModule.c index 83bd12bf24a3..5eec7065ea6e 100644 --- a/drivers/staging/bcm/PHSModule.c +++ b/drivers/staging/bcm/PHSModule.c @@ -963,11 +963,9 @@ UINT GetServiceFlowEntry(IN struct bcm_phs_table *psServiceFlowTable, for (i = 0; i < MAX_SERVICEFLOWS; i++) { curr_sf_list = &psServiceFlowTable->stSFList[i]; - if (curr_sf_list->bUsed) { - if (curr_sf_list->uiVcid == uiVcid) { - *ppstServiceFlowEntry = curr_sf_list; - return i; - } + if (curr_sf_list->bUsed && (curr_sf_list->uiVcid == uiVcid)) { + *ppstServiceFlowEntry = curr_sf_list; + return i; } }