Commit f0b9d875 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

staging: wfx: unlock on error path

We need to release the tx_lock on the error path before returning.

Fixes: d1c015b4 ("staging: wfx: rewrite wfx_hw_scan()")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Reviewed-by: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200512083656.GA251760@mwandaSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 34625c19
...@@ -57,8 +57,10 @@ static int send_scan_req(struct wfx_vif *wvif, ...@@ -57,8 +57,10 @@ static int send_scan_req(struct wfx_vif *wvif,
wvif->scan_abort = false; wvif->scan_abort = false;
reinit_completion(&wvif->scan_complete); reinit_completion(&wvif->scan_complete);
timeout = hif_scan(wvif, req, start_idx, i - start_idx); timeout = hif_scan(wvif, req, start_idx, i - start_idx);
if (timeout < 0) if (timeout < 0) {
wfx_tx_unlock(wvif->wdev);
return timeout; return timeout;
}
ret = wait_for_completion_timeout(&wvif->scan_complete, timeout); ret = wait_for_completion_timeout(&wvif->scan_complete, timeout);
if (req->channels[start_idx]->max_power != wvif->vif->bss_conf.txpower) if (req->channels[start_idx]->max_power != wvif->vif->bss_conf.txpower)
hif_set_output_power(wvif, wvif->vif->bss_conf.txpower); hif_set_output_power(wvif, wvif->vif->bss_conf.txpower);
......
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