aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-03-19 22:21:45 -0500
committerJohn W. Linville <linville@tuxdriver.com>2006-03-23 16:16:57 -0500
commit54b85f489bdfafc9306dfcc21e0d2687c34c3b34 (patch)
treec141cbcf5fbad9f7e68fdf12567871c049736b34 /drivers
parent971d1e69229f3dfc6dd233b8f4b82df2c35eedd8 (diff)
[PATCH] hostap: Fix ap_add_sta() return value verification
The Coverity checker (CID: 273) spotted this inconsequent NULL checking (unconditionally dereferencing directly after checking for NULL isn't a good idea). Return immediately to avoid this. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/hostap/hostap_ap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c
index 753a1de6664b..06c3fa32b310 100644
--- a/drivers/net/wireless/hostap/hostap_ap.c
+++ b/drivers/net/wireless/hostap/hostap_ap.c
@@ -3141,7 +3141,7 @@ int hostap_add_sta(struct ap_data *ap, u8 *sta_addr)
3141 if (ret == 1) { 3141 if (ret == 1) {
3142 sta = ap_add_sta(ap, sta_addr); 3142 sta = ap_add_sta(ap, sta_addr);
3143 if (!sta) 3143 if (!sta)
3144 ret = -1; 3144 return -1;
3145 sta->flags = WLAN_STA_AUTH | WLAN_STA_ASSOC; 3145 sta->flags = WLAN_STA_AUTH | WLAN_STA_ASSOC;
3146 sta->ap = 1; 3146 sta->ap = 1;
3147 memset(sta->supported_rates, 0, sizeof(sta->supported_rates)); 3147 memset(sta->supported_rates, 0, sizeof(sta->supported_rates));