diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2014-07-15 09:42:58 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-15 08:09:48 -0700 |
commit | 31f4f3fb15cd3e80cd162e4bf5524190be41d61d (patch) | |
tree | 21ef913b83f94bd79c17cd35cc1a488b29463e42 /drivers/staging/bcm/PHSModule.c | |
parent | 413852b6d4f4944c9c973029473cc0bc6ec82216 (diff) | |
download | linux-31f4f3fb15cd3e80cd162e4bf5524190be41d61d.tar.bz2 |
Staging: bcm: PHSModule.c: Replaced nested if statements with logical AND concatenation of the conditions
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>
Diffstat (limited to 'drivers/staging/bcm/PHSModule.c')
-rw-r--r-- | drivers/staging/bcm/PHSModule.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/staging/bcm/PHSModule.c b/drivers/staging/bcm/PHSModule.c index 55421efafb9b..89cc90c4bfbe 100644 --- a/drivers/staging/bcm/PHSModule.c +++ b/drivers/staging/bcm/PHSModule.c @@ -519,19 +519,19 @@ ULONG PhsDeletePHSRule(IN void *pvContext, if (pstClassifierRulesTable) { for (nClsidIndex = 0; nClsidIndex < MAX_PHSRULE_PER_SF; nClsidIndex++) { curr_entry = &pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex]; - if (curr_entry->bUsed && curr_entry->pstPhsRule) { - if (curr_entry->pstPhsRule->u8PHSI == u8PHSI) { + if (curr_entry->bUsed && + curr_entry->pstPhsRule && + (curr_entry->pstPhsRule->u8PHSI == u8PHSI)) { - if (curr_entry->pstPhsRule->u8RefCnt) - curr_entry->pstPhsRule->u8RefCnt--; + if (curr_entry->pstPhsRule->u8RefCnt) + curr_entry->pstPhsRule->u8RefCnt--; - if (0 == curr_entry->pstPhsRule->u8RefCnt) - kfree(curr_entry->pstPhsRule); + if (0 == curr_entry->pstPhsRule->u8RefCnt) + kfree(curr_entry->pstPhsRule); - memset(curr_entry, - 0, - sizeof(struct bcm_phs_classifier_entry)); - } + memset(curr_entry, + 0, + sizeof(struct bcm_phs_classifier_entry)); } } } |