wifi: iwlwifi: mvm: tx: remove misleading if statement
authorJohannes Berg <johannes.berg@intel.com>
Fri, 14 Apr 2023 10:12:06 +0000 (13:12 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 14 Apr 2023 11:16:18 +0000 (13:16 +0200)
The if statement here is misleading, we return zero anyway
since we just checked the 'ret' variable, simplify the code
to remove the condition entirely.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230414130637.57c1eb58e655.I1b47a7771cd66306931089c150c6b5b240bdcba5@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/tx.c

index 8bdc98daca5c776d5d664477d80a7bf7d0ee0038..09787b8a1c4cfb102ef680b0f3d8791cd5111d31 100644 (file)
@@ -1255,8 +1255,7 @@ int iwl_mvm_tx_skb_sta(struct iwl_mvm *mvm, struct sk_buff *skb,
        if (ret)
                return ret;
 
-       if (WARN_ON(skb_queue_empty(&mpdus_skbs)))
-               return ret;
+       WARN_ON(skb_queue_empty(&mpdus_skbs));
 
        while (!skb_queue_empty(&mpdus_skbs)) {
                skb = __skb_dequeue(&mpdus_skbs);