From nobody Sat Apr 18 02:47:41 2026 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 9DDC7C433EF for ; Tue, 19 Jul 2022 15:53:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239032AbiGSPx0 (ORCPT ); Tue, 19 Jul 2022 11:53:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238976AbiGSPxY (ORCPT ); Tue, 19 Jul 2022 11:53:24 -0400 Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FDDB20180 for ; Tue, 19 Jul 2022 08:53:20 -0700 (PDT) Received: from localhost.localdomain (unknown [83.149.199.65]) by mail.ispras.ru (Postfix) with ESMTPS id 5CEC44076251; Tue, 19 Jul 2022 15:53:14 +0000 (UTC) From: Andrey Strachuk To: Greg Kroah-Hartman Cc: Andrey Strachuk , Hans de Goede , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org Subject: [PATCH] staging: rtl8723bs: remove useless comparison in _rtw_reg_apply_flags() Date: Tue, 19 Jul 2022 18:53:09 +0300 Message-Id: <20220719155309.463286-1-strochuk@ispras.ru> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Local variable 'ch' is initialized by an address of field of ieee80211_supported_band structure, so it does not make sense to compare 'ch' with NULL. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Andrey Strachuk Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") --- drivers/staging/rtl8723bs/os_dep/wifi_regd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723bs/os_dep/wifi_regd.c b/drivers/staging= /rtl8723bs/os_dep/wifi_regd.c index 5eef1d68c6f0..62fbf9e1b849 100644 --- a/drivers/staging/rtl8723bs/os_dep/wifi_regd.c +++ b/drivers/staging/rtl8723bs/os_dep/wifi_regd.c @@ -74,8 +74,7 @@ static void _rtw_reg_apply_flags(struct wiphy *wiphy) for (j =3D 0; j < sband->n_channels; j++) { ch =3D &sband->channels[j]; =20 - if (ch) - ch->flags =3D IEEE80211_CHAN_DISABLED; + ch->flags =3D IEEE80211_CHAN_DISABLED; } } } --=20 2.25.1