iavf: drop duplicate iavf_{add|del}_cloud_filter() calls
authorAlexey Kodanev <aleksei.kodanev@bell-sw.com>
Mon, 26 Feb 2024 13:21:02 +0000 (13:21 +0000)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 6 Mar 2024 17:32:58 +0000 (09:32 -0800)
There are currently two pairs of identical checks and calls
to iavf_{add|del}_cloud_filter().

Detected using the static analysis tool - Svace.

Signed-off-by: Alexey Kodanev <aleksei.kodanev@bell-sw.com>
Reviewed-by: Ahmed Zaki <ahmed.zaki@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/iavf/iavf_main.c

index aefec6bd3b67f97460964606fad8498064bf67b4..ef2440f3abf8b6aed9f47e5948f67a5dec52b51e 100644 (file)
@@ -2170,19 +2170,10 @@ static int iavf_process_aq_command(struct iavf_adapter *adapter)
                iavf_add_cloud_filter(adapter);
                return 0;
        }
-
-       if (adapter->aq_required & IAVF_FLAG_AQ_DEL_CLOUD_FILTER) {
-               iavf_del_cloud_filter(adapter);
-               return 0;
-       }
        if (adapter->aq_required & IAVF_FLAG_AQ_DEL_CLOUD_FILTER) {
                iavf_del_cloud_filter(adapter);
                return 0;
        }
-       if (adapter->aq_required & IAVF_FLAG_AQ_ADD_CLOUD_FILTER) {
-               iavf_add_cloud_filter(adapter);
-               return 0;
-       }
        if (adapter->aq_required & IAVF_FLAG_AQ_ADD_FDIR_FILTER) {
                iavf_add_fdir_filter(adapter);
                return IAVF_SUCCESS;