summaryrefslogtreecommitdiff
path: root/drivers/staging/wfx/scan.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-25 09:11:19 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-25 09:11:19 +0200
commitc2312ff575fcaed96889d5bb5392afcc604c9442 (patch)
tree475d63360ee17732fac41c7c1e4a1636ed92e7cb /drivers/staging/wfx/scan.c
parenta3975dea1696b7c81319dc4b66e3c378dd47ccfb (diff)
parent9cb1fd0efd195590b828b9b865421ad345a4a145 (diff)
Merge 5.7-rc7 into staging-next
We need the staging/iio fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wfx/scan.c')
-rw-r--r--drivers/staging/wfx/scan.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/wfx/scan.c b/drivers/staging/wfx/scan.c
index ef411bcc2bf9..57ea9997800b 100644
--- a/drivers/staging/wfx/scan.c
+++ b/drivers/staging/wfx/scan.c
@@ -57,8 +57,10 @@ static int send_scan_req(struct wfx_vif *wvif,
wvif->scan_abort = false;
reinit_completion(&wvif->scan_complete);
timeout = hif_scan(wvif, req, start_idx, i - start_idx);
- if (timeout < 0)
+ if (timeout < 0) {
+ wfx_tx_unlock(wvif->wdev);
return timeout;
+ }
ret = wait_for_completion_timeout(&wvif->scan_complete, timeout);
if (req->channels[start_idx]->max_power != wvif->vif->bss_conf.txpower)
hif_set_output_power(wvif, wvif->vif->bss_conf.txpower);