Commit 15c3381e authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman

staging: wilc1000: fix static checker warning to unlock mutex in wilc_deinit()

Fix for static checker warning inconsistent returns of
'hif_deinit_lock'(more details [1]).

"drivers/staging/wilc1000/host_interface.c:3390 wilc_deinit()
              warn: inconsistent returns 'hif_deinit_lock'."

Fixes: ff52a57a ("staging: wilc1000: move the allocation of cmd out
of wilc_enqueue_cmd()")

[1]. https://www.spinics.net/lists/linux-driver-devel/msg114216.htmlReported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9b227cb1
...@@ -3370,15 +3370,15 @@ int wilc_deinit(struct wilc_vif *vif) ...@@ -3370,15 +3370,15 @@ int wilc_deinit(struct wilc_vif *vif)
struct host_if_msg *msg; struct host_if_msg *msg;
msg = wilc_alloc_work(vif, handle_hif_exit_work, true); msg = wilc_alloc_work(vif, handle_hif_exit_work, true);
if (IS_ERR(msg)) if (!IS_ERR(msg)) {
return PTR_ERR(msg); result = wilc_enqueue_work(msg);
if (result)
result = wilc_enqueue_work(msg); netdev_err(vif->ndev, "deinit : Error(%d)\n",
if (result) result);
netdev_err(vif->ndev, "deinit : Error(%d)\n", result); else
else wait_for_completion(&msg->work_comp);
wait_for_completion(&msg->work_comp); kfree(msg);
kfree(msg); }
destroy_workqueue(hif_workqueue); destroy_workqueue(hif_workqueue);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment