aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/staging
diff options
context:
space:
mode:
authorJérôme Pouiller <jerome.pouiller@silabs.com>2020-03-10 11:13:52 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-11 08:14:16 +0100
commitbab0a0b03442a62fe3abefcb2169e0b9ff95990c (patch)
tree4c1d593977841d52e257b5e3da3994ca458b1a72 /drivers/staging
parentstaging/speakup: fix get_word non-space look-ahead (diff)
downloadwireguard-linux-bab0a0b03442a62fe3abefcb2169e0b9ff95990c.tar.xz
wireguard-linux-bab0a0b03442a62fe3abefcb2169e0b9ff95990c.zip
staging: wfx: fix warning about freeing in-use mutex during device unregister
After hif_shutdown(), communication with the chip is no more possible. It the only request that never reply. Therefore, hif_cmd.lock is never unlocked. hif_shutdown() unlock itself hif_cmd.lock to avoid a potential warning during disposal of device. hif_cmd.key_renew_lock should also been unlocked for the same reason. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200310101356.182818-2-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/wfx/hif_tx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c
index 2428363371fa..7b732c531a74 100644
--- a/drivers/staging/wfx/hif_tx.c
+++ b/drivers/staging/wfx/hif_tx.c
@@ -140,6 +140,7 @@ int hif_shutdown(struct wfx_dev *wdev)
else
control_reg_write(wdev, 0);
mutex_unlock(&wdev->hif_cmd.lock);
+ mutex_unlock(&wdev->hif_cmd.key_renew_lock);
kfree(hif);
return ret;
}