net: wireless: rsi: New NULL pointer references.

Fixes for additional NULL pointer references found in 5.1
Signed-off-by: default avatarAngus Ainslie (Purism) <angus@akkea.ca>
parent 2b8d5c0f
Pipeline #5244 passed with stage
in 16 minutes and 13 seconds
......@@ -452,7 +452,7 @@ static int rsi_mac80211_hw_scan_start(struct ieee80211_hw *hw,
cancel_work_sync(&common->scan_work);
mutex_lock(&common->mutex);
if (!bss->assoc) {
if (!adapter->vifs[0] || !bss->assoc) {
if (common->antenna_diversity)
rsi_trigger_antenna_change(common);
......@@ -787,7 +787,8 @@ static int rsi_mac80211_add_interface(struct ieee80211_hw *hw,
ret = -EINVAL;
goto out;
}
if (adapter->vifs[0]->bss_conf.assoc)
if (adapter->vifs[0]
&& adapter->vifs[0]->bss_conf.assoc)
return -EOPNOTSUPP;
}
......
......@@ -2564,7 +2564,7 @@ int rsi_send_ps_request(struct rsi_hw *adapter, bool enable)
assoc = false;
} else {
bss = &adapter->vifs[0]->bss_conf;
if (bss->assoc)
if (adapter->vifs[0] && bss->assoc)
assoc = true;
else
assoc = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment