Signed-off-by: Matthias Beyer <mail@xxxxxxxxxxxxxxxx> --- drivers/staging/bcm/PHSModule.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/drivers/staging/bcm/PHSModule.c b/drivers/staging/bcm/PHSModule.c index c290178..9a24845 100644 --- a/drivers/staging/bcm/PHSModule.c +++ b/drivers/staging/bcm/PHSModule.c @@ -948,24 +948,10 @@ out: static bool ValidatePHSRuleComplete(IN struct bcm_phs_rule *psPhsRule) { - if (psPhsRule) { - if (!psPhsRule->u8PHSI) { - /* PHSI is not valid */ - return false; - } - - if (!psPhsRule->u8PHSS) { - /* PHSS Is Undefined */ - return false; - } - - /* Check if PHSF is defines for the PHS Rule */ - if (!psPhsRule->u8PHSFLength) /* If any part of PHSF is valid then Rule contains valid PHSF */ - return false; - - return TRUE; - } else - return false; + return (psPhsRule && + psPhsRule->u8PHSI && + psPhsRule->u8PHSS && + psPhsRule->u8PHSFLength); } UINT GetServiceFlowEntry(IN struct bcm_phs_table *psServiceFlowTable, -- 2.0.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel