Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp312353rwe; Fri, 14 Apr 2023 03:17:36 -0700 (PDT) X-Google-Smtp-Source: AKy350alKrME+rOPNuuVvyvFVJX9CZunqWtHepsJyQ4f+yoMLbFz6abVzrC0Q/ZJEF30c5Kr9+dX X-Received: by 2002:a05:6a00:854:b0:634:b231:d2ec with SMTP id q20-20020a056a00085400b00634b231d2ecmr8982123pfk.25.1681467456755; Fri, 14 Apr 2023 03:17:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681467456; cv=none; d=google.com; s=arc-20160816; b=pN8ckqN1S2ekuomtkwl9l31RdiZFe1+3uU04I6QGyQBQPN3P/l6UPY51fsIk5Q5qQF 2+P9j9DFYwEbsRYvyF9l704c9gGIljLEvfwXU9Jm2idT9TYQu4nQ09/0dLq12s2Uxima d/ufwjjtU3KOYW8D8OfeWx+kOFeZIF8exaTwtU5BCodiwpmOdTZPSyK/dgLJ2qIzRJ7Z pzVlFinQCMwjl1NxBXUVMcULizXflvJ+9zkQlwBBBCNO2cBst6t2h4ZsK6f/04anS2H+ 84Ah0Kk7FRtCrKoEDIb1kVM+y0lceaxcdgEJ718HCR5QIcHHYLNvOpz1TB9yrmOxJPEl /hbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fs0szVYy0sDrvovE6CdbQwjDAOAaXDrVTMb692sv/4o=; b=joMFerW1ZM2vwnhQ1OFPC74F5eKAj4vKQqx+0oQRKATgY451hscWJpvSN/q1bjur3e jO5MpL6Xi6RcDTDTN3FNoRYmFMWmRWudrqLBGgs1IbGqIq+AGPgbk9Rs1AwPGGsuRcPk qw4KMa0q1XpS8UHzvy7HEywQKAJpDMkGJauqv4a1TW172RoeV03KZjlGpMUumfGyiLxp vGHIqkp7UTDbooW2Wf1jBYhgo689CmSLYU0YS7x/po5FuYZwxeS3VkwpG3b1Mr7YdlFX UQt36woLBWtmFQMrXiWeW8C3+pNF3UC2Eu3hFJ+SeSV7ZwgA8sqoDwwgky3JFwLhAcy0 WADQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Ee+aI9Me; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f66-20020a625145000000b006387e0048c8si4013833pfb.217.2023.04.14.03.17.27; Fri, 14 Apr 2023 03:17:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Ee+aI9Me; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229947AbjDNKP5 (ORCPT + 62 others); Fri, 14 Apr 2023 06:15:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229937AbjDNKPz (ORCPT ); Fri, 14 Apr 2023 06:15:55 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1799A2107 for ; Fri, 14 Apr 2023 03:15:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681467346; x=1713003346; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TET7QFqLFEl8L4EgJteqE2HSDpxkWFXQNsZZ9jYFTbw=; b=Ee+aI9MeVL4bAC6+Ff8vJJKX59u1svaAYCBp+4esKJcBPHKwXYufi7/k 3YhjaqVNvnyRAGZyZk3ApzmiD8wOEW4W4OUTS9SKWsx1KlNy9uGxujCUR PEGb/1q2QmBTHWCxwZMIhuS/j9rYrPrwWhIzsx1N7fMHPAKIwPr/aqGLz n8wfOgoqPW88IhPGDL6PQHG93nOrXITleFQ84sVPAMbQxHtgFxQaEPJkP mQcLve+JxTyjpPCbHbnJE+wFBg/3pisJWzTXYWsYQCbJcE7F1hKGcpfgA ViBQFjTQEP1kbNvb/XywdnhuMDspWALd8N92vtNuaLwxz2BFXQ2Kte/ul Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10679"; a="346263703" X-IronPort-AV: E=Sophos;i="5.99,195,1677571200"; d="scan'208";a="346263703" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2023 03:12:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10679"; a="692351846" X-IronPort-AV: E=Sophos;i="5.99,195,1677571200"; d="scan'208";a="692351846" Received: from yalankry-mobl.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.214.233.156]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2023 03:12:48 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH 15/15] wifi: iwlwifi: mvm: tx: remove misleading if statement Date: Fri, 14 Apr 2023 13:12:06 +0300 Message-Id: <20230414130637.57c1eb58e655.I1b47a7771cd66306931089c150c6b5b240bdcba5@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230414101206.1170180-1-gregory.greenman@intel.com> References: <20230414101206.1170180-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg 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 Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c index ab448ff6a740..66b5e8700983 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c @@ -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); -- 2.38.1