Skip to content

Commit

Permalink
staging: wfx: fix warning about freeing in-use mutex during device un…
Browse files Browse the repository at this point in the history
…register

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>
  • Loading branch information
Jérôme Pouiller authored and Greg Kroah-Hartman committed Mar 11, 2020
1 parent 9d32c0c commit bab0a0b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/staging/wfx/hif_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit bab0a0b

Please sign in to comment.