From: Andrey Strachuk <strochuk@ispras.ru>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Andrey Strachuk <strochuk@ispras.ru>,
Hans de Goede <hdegoede@redhat.com>,
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 [thread overview]
Message-ID: <20220719155309.463286-1-strochuk@ispras.ru> (raw)
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 <strochuk@ispras.ru>
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 = 0; j < sband->n_channels; j++) {
ch = &sband->channels[j];
- if (ch)
- ch->flags = IEEE80211_CHAN_DISABLED;
+ ch->flags = IEEE80211_CHAN_DISABLED;
}
}
}
--
2.25.1
next reply other threads:[~2022-07-19 15:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-19 15:53 Andrey Strachuk [this message]
2022-07-27 6:41 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220719155309.463286-1-strochuk@ispras.ru \
--to=strochuk@ispras.ru \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=ldv-project@linuxtesting.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®