linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Staging: rtlwifi: Remove NULL pointer dereference
@ 2017-10-09 21:18 Shreeya Patel
  2017-10-10  0:06 ` Tobin C. Harding
  2017-10-11 19:11 ` kbuild test robot
  0 siblings, 2 replies; 6+ messages in thread
From: Shreeya Patel @ 2017-10-09 21:18 UTC (permalink / raw)
  To: gregkh, devel, linux-kernel; +Cc: Shreeya Patel

Remove NULL pointer dereference as it results in undefined
behaviour, and will usually lead to a runtime error.

Signed-off-by: Shreeya Patel <shreeya.patel23498@gmail.com>
---
 drivers/staging/rtlwifi/base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtlwifi/base.c b/drivers/staging/rtlwifi/base.c
index b88b0e8..5bb8f98 100644
--- a/drivers/staging/rtlwifi/base.c
+++ b/drivers/staging/rtlwifi/base.c
@@ -781,7 +781,7 @@ static void _rtl_txrate_selectmode(struct ieee80211_hw *hw,
 
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
-	struct rtl_sta_info *sta_entry = NULL;
+	struct rtl_sta_info *sta_entry;
 	u8 ratr_index = SET_RATE_ID(RATR_INX_WIRELESS_MC);
 
 	if (sta) {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-10-13 18:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-09 21:18 [PATCH] Staging: rtlwifi: Remove NULL pointer dereference Shreeya Patel
2017-10-10  0:06 ` Tobin C. Harding
2017-10-11 12:32   ` Shreeya Patel
2017-10-12  2:16     ` Tobin C. Harding
2017-10-13 18:55       ` Shreeya Patel
2017-10-11 19:11 ` kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).