Skip to content

Commit f0b9d87

Browse files
Dan Carpentergregkh
authored andcommitted
staging: wfx: unlock on error path
We need to release the tx_lock on the error path before returning. Fixes: d1c015b ("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]>
1 parent 34625c1 commit f0b9d87

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/staging/wfx/scan.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ static int send_scan_req(struct wfx_vif *wvif,
5757
wvif->scan_abort = false;
5858
reinit_completion(&wvif->scan_complete);
5959
timeout = hif_scan(wvif, req, start_idx, i - start_idx);
60-
if (timeout < 0)
60+
if (timeout < 0) {
61+
wfx_tx_unlock(wvif->wdev);
6162
return timeout;
63+
}
6264
ret = wait_for_completion_timeout(&wvif->scan_complete, timeout);
6365
if (req->channels[start_idx]->max_power != wvif->vif->bss_conf.txpower)
6466
hif_set_output_power(wvif, wvif->vif->bss_conf.txpower);

0 commit comments

Comments
 (0)