From: Matthias Beyer Date: Tue, 15 Jul 2014 07:43:12 +0000 (+0200) Subject: Staging: bcm: PHSModule.c: Simplified nested if statements by linking them with logic... X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=18002f567fcbfcaf36c1ed359bca603d2cc58b8e;p=deliverable%2Flinux.git 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 --- 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; } }