Skip to content

Commit bab0a0b

Browse files
jerome-pouillergregkh
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9d32c0c commit bab0a0b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/staging/wfx/hif_tx.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ int hif_shutdown(struct wfx_dev *wdev)
140140
else
141141
control_reg_write(wdev, 0);
142142
mutex_unlock(&wdev->hif_cmd.lock);
143+
mutex_unlock(&wdev->hif_cmd.key_renew_lock);
143144
kfree(hif);
144145
return ret;
145146
}

0 commit comments

Comments
 (0)