[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220719155309.463286-1-strochuk@ispras.ru>
Date: Tue, 19 Jul 2022 18:53:09 +0300
From: Andrey Strachuk <strochuk@...ras.ru>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Andrey Strachuk <strochuk@...ras.ru>,
Hans de Goede <hdegoede@...hat.com>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
ldv-project@...uxtesting.org
Subject: [PATCH] staging: rtl8723bs: remove useless comparison in _rtw_reg_apply_flags()
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@...ras.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
Powered by blists - more mailing lists