Staging: bcm: PHSModule.c: Simplified nested if statements by linking them with logic...
authorMatthias Beyer <mail@beyermatthias.de>
Tue, 15 Jul 2014 07:43:10 +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 83bd12bf24a34dae201309cfb5d290f511d8db8e..5eec7065ea6e49ff295e21ff82638a4f69d527b1 100644 (file)
@@ -963,11 +963,9 @@ UINT GetServiceFlowEntry(IN struct bcm_phs_table *psServiceFlowTable,
 
        for (i = 0; i < MAX_SERVICEFLOWS; i++) {
                curr_sf_list = &psServiceFlowTable->stSFList[i];
-               if (curr_sf_list->bUsed) {
-                       if (curr_sf_list->uiVcid == uiVcid) {
-                               *ppstServiceFlowEntry = curr_sf_list;
-                               return i;
-                       }
+               if (curr_sf_list->bUsed && (curr_sf_list->uiVcid == uiVcid)) {
+                       *ppstServiceFlowEntry = curr_sf_list;
+                       return i;
                }
        }