projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c15cc49
)
staging: rtl8723au: fix static checker warning
author
Geliang Tang
<
[email protected]
>
Tue, 1 Mar 2016 15:22:23 +0000
(23:22 +0800)
committer
Greg Kroah-Hartman
<
[email protected]
>
Sat, 12 Mar 2016 06:09:09 +0000
(22:09 -0800)
Fix the following static checker warning:
drivers/staging/rtl8723au/core/rtw_sta_mgt.c:365 rtw_get_stainfo23a()
error: potential NULL dereference 'psta'.
Fixes: e280d71("staging: rtl8723au: use list_for_each_entry*()")
Signed-off-by: Geliang Tang <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/staging/rtl8723au/core/rtw_sta_mgt.c
patch
|
blob
|
history
diff --git
a/drivers/staging/rtl8723au/core/rtw_sta_mgt.c
b/drivers/staging/rtl8723au/core/rtw_sta_mgt.c
index 22d857b6e8d0dcd12b11fe67bb832df232626eae..5f85ee065779eb989fddfb7b22c9c740c34402db 100644
(file)
--- a/
drivers/staging/rtl8723au/core/rtw_sta_mgt.c
+++ b/
drivers/staging/rtl8723au/core/rtw_sta_mgt.c
@@
-346,7
+346,7
@@
void rtw_free_all_stainfo23a(struct rtw_adapter *padapter)
struct sta_info *rtw_get_stainfo23a(struct sta_priv *pstapriv, const u8 *hwaddr)
{
struct list_head *phead;
- struct sta_info *psta = NULL;
+ struct sta_info *p
os, *p
sta = NULL;
u32 index;
const u8 *addr;
@@
-362,7
+362,9
@@
struct sta_info *rtw_get_stainfo23a(struct sta_priv *pstapriv, const u8 *hwaddr)
spin_lock_bh(&pstapriv->sta_hash_lock);
phead = &pstapriv->sta_hash[index];
- list_for_each_entry(psta, phead, hash_list) {
+ list_for_each_entry(pos, phead, hash_list) {
+ psta = pos;
+
/* if found the matched address */
if (ether_addr_equal(psta->hwaddr, addr))
break;