Commit 525afdd1 authored by Matthias Beyer's avatar Matthias Beyer Committed by Greg Kroah-Hartman

Staging: bcm: PHSModule.c: Reduced indentation level by using jump label

Signed-off-by: default avatarMatthias Beyer <mail@beyermatthias.de>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 31f4f3fb
...@@ -564,44 +564,47 @@ ULONG PhsDeleteClassifierRule(IN void *pvContext, IN B_UINT16 uiVcid, IN B_UINT1 ...@@ -564,44 +564,47 @@ ULONG PhsDeleteClassifierRule(IN void *pvContext, IN B_UINT16 uiVcid, IN B_UINT1
struct bcm_phs_extension *pDeviceExtension = struct bcm_phs_extension *pDeviceExtension =
(struct bcm_phs_extension *)pvContext; (struct bcm_phs_extension *)pvContext;
if (pDeviceExtension) { if (!pDeviceExtension)
/* Retrieve the SFID Entry Index for requested Service Flow */ goto out;
nSFIndex = GetServiceFlowEntry(pDeviceExtension->pstServiceFlowPhsRulesTable,
uiVcid, &pstServiceFlowEntry); /* Retrieve the SFID Entry Index for requested Service Flow */
if (nSFIndex == PHS_INVALID_TABLE_INDEX) { nSFIndex = GetServiceFlowEntry(pDeviceExtension->pstServiceFlowPhsRulesTable,
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, PHS_DISPATCH, uiVcid, &pstServiceFlowEntry);
DBG_LVL_ALL, "SFID Match Failed\n"); if (nSFIndex == PHS_INVALID_TABLE_INDEX) {
return ERR_SF_MATCH_FAIL; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, PHS_DISPATCH,
} DBG_LVL_ALL, "SFID Match Failed\n");
return ERR_SF_MATCH_FAIL;
}
nClsidIndex = GetClassifierEntry(pstServiceFlowEntry->pstClassifierTable, nClsidIndex = GetClassifierEntry(pstServiceFlowEntry->pstClassifierTable,
uiClsId, uiClsId,
eActiveClassifierRuleContext, eActiveClassifierRuleContext,
&pstClassifierEntry); &pstClassifierEntry);
if ((nClsidIndex != PHS_INVALID_TABLE_INDEX) && (!pstClassifierEntry->bUnclassifiedPHSRule)) { if ((nClsidIndex != PHS_INVALID_TABLE_INDEX) && (!pstClassifierEntry->bUnclassifiedPHSRule)) {
if (pstClassifierEntry->pstPhsRule) { if (pstClassifierEntry->pstPhsRule) {
if (pstClassifierEntry->pstPhsRule->u8RefCnt) if (pstClassifierEntry->pstPhsRule->u8RefCnt)
pstClassifierEntry->pstPhsRule->u8RefCnt--; pstClassifierEntry->pstPhsRule->u8RefCnt--;
if (0 == pstClassifierEntry->pstPhsRule->u8RefCnt) if (0 == pstClassifierEntry->pstPhsRule->u8RefCnt)
kfree(pstClassifierEntry->pstPhsRule); kfree(pstClassifierEntry->pstPhsRule);
}
memset(pstClassifierEntry, 0,
sizeof(struct bcm_phs_classifier_entry));
} }
memset(pstClassifierEntry, 0,
sizeof(struct bcm_phs_classifier_entry));
}
nClsidIndex = GetClassifierEntry(pstServiceFlowEntry->pstClassifierTable, nClsidIndex = GetClassifierEntry(pstServiceFlowEntry->pstClassifierTable,
uiClsId, uiClsId,
eOldClassifierRuleContext, eOldClassifierRuleContext,
&pstClassifierEntry); &pstClassifierEntry);
if ((nClsidIndex != PHS_INVALID_TABLE_INDEX) && (!pstClassifierEntry->bUnclassifiedPHSRule)) { if ((nClsidIndex != PHS_INVALID_TABLE_INDEX) && (!pstClassifierEntry->bUnclassifiedPHSRule)) {
kfree(pstClassifierEntry->pstPhsRule); kfree(pstClassifierEntry->pstPhsRule);
memset(pstClassifierEntry, 0, memset(pstClassifierEntry, 0,
sizeof(struct bcm_phs_classifier_entry)); sizeof(struct bcm_phs_classifier_entry));
}
} }
out:
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment