iwlwifi: testing the wrong variable in iwl_add_bssid_station()
PATCH 1/1 iwlwifi: testing the wrong variable in iwl_add_bssid_station()
The intent here is to test that "sta_id_r" is a valid pointer. We do this same test later on in the function.
Btw iwl_add_bssid_station() is called from two places and "sta_id_r" is a valid pointer from both callers.
drivers/net/wireless/iwlwifi/iwl-sta.c +1 -1
@@ -431,7 +431,7 @@ int iwl_add_bssid_station(struct iwl_priv *priv, const u8 *addr, bool init_rs,struct iwl_link_quality_cmd *link_cmd;unsigned long flags; -if (*sta_id_r) +if (sta_id_r) *sta_id_r =IWL_INVALID_STATION ; ret =iwl_add_station_common (priv, addr,0 ,NULL , &sta_id);
Quoted 2 lines
The intent here is to test that "
sta_id_r" is a valid pointer. We do this same test later on in the function.
Indeed, thanks.
Quoted 2 lines
Btw
iwl_add_bssid_station()is called from two places and "sta_id_r" is a valid pointer from both callers.
Which explains why I didn't see that, and probably means that we don't need the test at all...
johannes
---------------------------------------------------------------------
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen Germany
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer
Registergericht: Muenchen HRB 47456 Ust.-IdNr.
VAT Registration No.: DE129385895
Citibank Frankfurt (BLZ 502 109 00) 600119052
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.