Staging: bcm: PHSModule.c: Simplified nested if statements by linking them with logic...
authorMatthias Beyer <mail@beyermatthias.de>
Tue, 15 Jul 2014 07:43:12 +0000 (09:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Jul 2014 15:09:49 +0000 (08:09 -0700)
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/bcm/PHSModule.c

index 4074eb8550bd6be080112f484a65b72ead0b59d8..ceb57587f40ad21c2522d9d7aa6eef4992006dae 100644 (file)
@@ -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;
                }
        }