summaryrefslogtreecommitdiffstats
path: root/drivers/staging/bcm/PHSModule.c
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2014-07-15 09:42:57 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-15 08:09:47 -0700
commit413852b6d4f4944c9c973029473cc0bc6ec82216 (patch)
tree4435b460d8caffde80bec43538029b042bb71313 /drivers/staging/bcm/PHSModule.c
parentc50e0b5c77cda8332cf44bd4245d101cdae91e3f (diff)
Staging: bcm: PHSModule.c: Replaced member accessing with variable in PhsDeletePHSRule()
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.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/staging/bcm/PHSModule.c b/drivers/staging/bcm/PHSModule.c
index f726f2e446f..55421efafb9 100644
--- a/drivers/staging/bcm/PHSModule.c
+++ b/drivers/staging/bcm/PHSModule.c
@@ -499,6 +499,7 @@ ULONG PhsDeletePHSRule(IN void *pvContext,
struct bcm_phs_classifier_table *pstClassifierRulesTable = NULL;
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
struct bcm_phs_extension *pDeviceExtension = (struct bcm_phs_extension *)pvContext;
+ struct bcm_phs_classifier_entry *curr_entry;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, PHS_DISPATCH, DBG_LVL_ALL,
"======>\n");
@@ -517,16 +518,17 @@ ULONG PhsDeletePHSRule(IN void *pvContext,
pstClassifierRulesTable = pstServiceFlowEntry->pstClassifierTable;
if (pstClassifierRulesTable) {
for (nClsidIndex = 0; nClsidIndex < MAX_PHSRULE_PER_SF; nClsidIndex++) {
- if (pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex].bUsed && pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex].pstPhsRule) {
- if (pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex].pstPhsRule->u8PHSI == u8PHSI) {
+ curr_entry = &pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex];
+ if (curr_entry->bUsed && curr_entry->pstPhsRule) {
+ if (curr_entry->pstPhsRule->u8PHSI == u8PHSI) {
- if (pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex].pstPhsRule->u8RefCnt)
- pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex].pstPhsRule->u8RefCnt--;
+ if (curr_entry->pstPhsRule->u8RefCnt)
+ curr_entry->pstPhsRule->u8RefCnt--;
- if (0 == pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex].pstPhsRule->u8RefCnt)
- kfree(pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex].pstPhsRule);
+ if (0 == curr_entry->pstPhsRule->u8RefCnt)
+ kfree(curr_entry->pstPhsRule);
- memset(&pstClassifierRulesTable->stActivePhsRulesList[nClsidIndex],
+ memset(curr_entry,
0,
sizeof(struct bcm_phs_classifier_entry));
}