diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2014-03-05 23:26:01 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-03-06 19:29:57 (GMT) |
commit | 7ce24ab74c04ce0ce238b5dce30e9bc3823527be (patch) | |
tree | a3f689752418bb585172cf859362068061e05829 /drivers/net/wireless/rtlwifi/rtl8723be | |
parent | 2903d04b5abe10393f659c5a0a4f8adec1b67b65 (diff) | |
download | linux-7ce24ab74c04ce0ce238b5dce30e9bc3823527be.tar.xz |
rtlwifi: rtl8723be: Fix smatch warnings
Smatch reports the following:
drivers/net/wireless/rtlwifi/rtl8723be/fw.c:208 _rtl8723be_fill_h2c_command() warn: variable dereferenced before check 'rtlhal' (see line 69)
drivers/net/wireless/rtlwifi/rtl8723be/hw.c:1732 _rtl8723be_read_adapter_info() error: __builtin_memcpy() '&rtlefuse->efuse_map[0][0]' too small (256 vs 512)
The first one is fixed by removing two pointless tests for NULL pointers.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8723be')
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8723be/fw.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8723be/fw.c b/drivers/net/wireless/rtlwifi/rtl8723be/fw.c index 0f3522d..f856be6 100644 --- a/drivers/net/wireless/rtlwifi/rtl8723be/fw.c +++ b/drivers/net/wireless/rtlwifi/rtl8723be/fw.c @@ -201,14 +201,6 @@ static void _rtl8723be_fill_h2c_command(struct ieee80211_hw *hw, u8 element_id, "pHalData->last_hmeboxnum = %d\n", rtlhal->last_hmeboxnum); } - if (!rtlpriv) { - pr_err("rtlpriv bad\n"); - return; - } - if (!rtlhal) { - pr_err("rtlhal bad\n"); - return; - } spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); rtlhal->h2c_setinprogress = false; spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); |