From: Adrian Bunk The Coverity checker spotted this inconsequent NULL checking (unconditionally dereferencing directly after checking for NULL isn't a good idea). Signed-off-by: Adrian Bunk Cc: "John W. Linville" Signed-off-by: Andrew Morton --- drivers/net/wireless/hostap/hostap_ap.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/net/wireless/hostap/hostap_ap.c~hostap_apchostap_add_sta-inconsequent-null-checking drivers/net/wireless/hostap/hostap_ap.c --- devel/drivers/net/wireless/hostap/hostap_ap.c~hostap_apchostap_add_sta-inconsequent-null-checking 2006-03-11 00:06:46.000000000 -0800 +++ devel-akpm/drivers/net/wireless/hostap/hostap_ap.c 2006-03-11 00:06:46.000000000 -0800 @@ -3141,7 +3141,7 @@ int hostap_add_sta(struct ap_data *ap, u if (ret == 1) { sta = ap_add_sta(ap, sta_addr); if (!sta) - ret = -1; + return -1; sta->flags = WLAN_STA_AUTH | WLAN_STA_ASSOC; sta->ap = 1; memset(sta->supported_rates, 0, sizeof(sta->supported_rates)); _