]> Git Repo - linux.git/commitdiff
staging: wfx: unlock on error path
authorDan Carpenter <[email protected]>
Tue, 12 May 2020 08:36:56 +0000 (11:36 +0300)
committerGreg Kroah-Hartman <[email protected]>
Wed, 13 May 2020 12:00:44 +0000 (14:00 +0200)
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 <[email protected]>
Cc: stable <[email protected]>
Reviewed-by: Jérôme Pouiller <[email protected]>
Link: https://lore.kernel.org/r/20200512083656.GA251760@mwanda
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/staging/wfx/scan.c

index 6e1e50048651ed184b0868f7f55b3e329c80ca61..9aa14331affd636730ac0cbe824fffd72b7dd056 100644 (file)
@@ -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);
This page took 0.083523 seconds and 4 git commands to generate.