[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN6PR17MB0996855CE6529373A40A3CC6CA110@BN6PR17MB0996.namprd17.prod.outlook.com>
Date: Sat, 22 Sep 2018 14:23:54 +0000
From: Karthik Nishanth <nishanthkarthik@...e.com>
To: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC: "Larry.Finger@...inger.net" <Larry.Finger@...inger.net>,
"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Karthik Nishanth" <nishanthkarthik@...e.com>
Subject: [PATCH v2] Staging: rtlwifi: remove unnecessary NULL check
The member regd of the struct rtl_priv is true in a boolean context.
drivers/staging/rtlwifi/regd.c:413:27: warning: address of 'rtlpriv->regd' will always
evaluate to 'true' [-Wpointer-bool-conversion]
if (!wiphy || !&rtlpriv->regd)
~ ~~~~~~~~~^~~~
1 warning generated.
Link: https://github.com/ClangBuiltLinux/linux/issues/170
Signed-off-by: Karthik Nishanth <nishanthkarthik@...e.com>
---
v2: changed the subject
drivers/staging/rtlwifi/regd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtlwifi/regd.c b/drivers/staging/rtlwifi/regd.c
index 3afd206ce4b1..5213ca771175 100644
--- a/drivers/staging/rtlwifi/regd.c
+++ b/drivers/staging/rtlwifi/regd.c
@@ -410,7 +410,7 @@ int rtl_regd_init(struct ieee80211_hw *hw,
struct wiphy *wiphy = hw->wiphy;
struct country_code_to_enum_rd *country = NULL;
- if (!wiphy || !&rtlpriv->regd)
+ if (!wiphy)
return -EINVAL;
/* init country_code from efuse channel plan */
--
2.19.0
Powered by blists - more mailing lists