Messages in this thread Patch in this message | | | From | Shreeya Patel <> | Subject | [PATCH] Staging: rtlwifi: Remove NULL pointer dereference | Date | Tue, 10 Oct 2017 02:48:58 +0530 |
| |
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
| |