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>
 
        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;
                }
        }