From: Adrian Bunk <[EMAIL PROTECTED]>
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 <[EMAIL PROTECTED]>
Signed-off-by: Jouni Malinen <[EMAIL PROTECTED]>


Index: wireless-2.6/drivers/net/wireless/hostap/hostap_ap.c
===================================================================
--- wireless-2.6.orig/drivers/net/wireless/hostap/hostap_ap.c
+++ wireless-2.6/drivers/net/wireless/hostap/hostap_ap.c
@@ -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));

--

-- 
Jouni Malinen                                            PGP id EFC895FA
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to