From 18002f567fcbfcaf36c1ed359bca603d2cc58b8e Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 15 Jul 2014 09:43:12 +0200 Subject: [PATCH] Staging: bcm: PHSModule.c: Simplified nested if statements by linking them with logical AND in GetPhsRuleEntry() Signed-off-by: Matthias Beyer Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- drivers/staging/bcm/PHSModule.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/bcm/PHSModule.c b/drivers/staging/bcm/PHSModule.c index 4074eb8550bd..ceb57587f40a 100644 --- a/drivers/staging/bcm/PHSModule.c +++ b/drivers/staging/bcm/PHSModule.c @@ -1017,11 +1017,10 @@ static UINT GetPhsRuleEntry(IN struct bcm_phs_classifier_table *pstClassifierTab pstClassifierRule = &pstClassifierTable->stOldPhsRulesList[i]; - if (pstClassifierRule->bUsed) { - if (pstClassifierRule->u8PHSI == uiPHSI) { - *ppstPhsRule = pstClassifierRule->pstPhsRule; - return i; - } + if (pstClassifierRule->bUsed && + (pstClassifierRule->u8PHSI == uiPHSI)) { + *ppstPhsRule = pstClassifierRule->pstPhsRule; + return i; } } -- 2.34.1