diff options
| author | Dan Carpenter <dan.carpenter@oracle.com> | 2020-05-12 11:36:56 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-27 17:48:21 +0200 |
| commit | a990493efa0d4f820c15b2e8860d234337963872 (patch) | |
| tree | 75e2a366cf8d0bfd262aee5d74db6ce38edf01da | |
| parent | 76c83826409d03bf519cd3f07307f5df975856c9 (diff) | |
| download | linux-a990493efa0d4f820c15b2e8860d234337963872.tar.gz linux-a990493efa0d4f820c15b2e8860d234337963872.tar.bz2 linux-a990493efa0d4f820c15b2e8860d234337963872.zip | |
staging: wfx: unlock on error path
commit f0b9d875faa4499afe3381404c3795e9da84bc00 upstream.
We need to release the tx_lock on the error path before returning.
Fixes: d1c015b4ef6f ("staging: wfx: rewrite wfx_hw_scan()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200512083656.GA251760@mwanda
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/wfx/scan.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/wfx/scan.c b/drivers/staging/wfx/scan.c index 6e1e50048651..9aa14331affd 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); |
