From patchwork Wed Sep 6 09:36:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Antipov X-Patchwork-Id: 721735 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1ED21EB8FAF for ; Wed, 6 Sep 2023 09:37:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233319AbjIFJh7 (ORCPT ); Wed, 6 Sep 2023 05:37:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229991AbjIFJh6 (ORCPT ); Wed, 6 Sep 2023 05:37:58 -0400 Received: from forward101a.mail.yandex.net (forward101a.mail.yandex.net [IPv6:2a02:6b8:c0e:500:1:45:d181:d101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A06D10D0 for ; Wed, 6 Sep 2023 02:37:53 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-51.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-51.vla.yp-c.yandex.net [IPv6:2a02:6b8:c22:d84:0:640:51d4:0]) by forward101a.mail.yandex.net (Yandex) with ESMTP id A979742322; Wed, 6 Sep 2023 12:37:35 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-51.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id YbUwVB1WliE0-QJNhyVH5; Wed, 06 Sep 2023 12:37:35 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1693993055; bh=H9mtoWSF8K60E7Mct4idhTBiYLlmvfyM4sv1+L+IpAI=; h=Message-ID:Date:Cc:Subject:To:From; b=MbhDm+Pjm0kb+kycMJ9lg4+5kLFL1kqT9XXSDKtRQ5AzjoqEAG66ohjAJhyY2U87L bKb5a/SU7EsbvpI0wBWFnqPk4TcnNFoMgTuxWO0H8CZrGM40Hn7DoYLJENBvLJWg6W Ltm97bndnp17jlnfRIkLV8KlNV4B/QGmmPPMMH90= Authentication-Results: mail-nwsmtp-smtp-production-main-51.vla.yp-c.yandex.net; dkim=pass header.i=@yandex.ru From: Dmitry Antipov To: Jeff Johnson Cc: Kalle Valo , linux-wireless@vger.kernel.org, lvc-project@linuxtesting.org, ath11k@lists.infradead.org, Dmitry Antipov Subject: [PATCH] wifi: ath11k: drop NULL pointer check in ath11k_update_per_peer_tx_stats() Date: Wed, 6 Sep 2023 12:36:55 +0300 Message-ID: <20230906093704.14001-1-dmantipov@yandex.ru> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Since 'user_stats' is a fixed-size array of 'struct htt_ppdu_user_stats' in 'struct htt_ppdu_stats', any of its member can't be NULL and so relevant check may be dropped. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Antipov --- drivers/net/wireless/ath/ath11k/dp_rx.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index 62bc98852f0f..146201d8dba2 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -1388,9 +1388,6 @@ ath11k_update_per_peer_tx_stats(struct ath11k *ar, u8 tid = HTT_PPDU_STATS_NON_QOS_TID; bool is_ampdu = false; - if (!usr_stats) - return; - if (!(usr_stats->tlv_flags & BIT(HTT_PPDU_STATS_TAG_USR_RATE))) return;