From c842dd2ddb888d64ad50387d36f93a5225cb0a9b Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 15 Jul 2014 09:43:10 +0200 Subject: [PATCH] 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 --- drivers/staging/bcm/PHSModule.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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; } } -- 2.30.2