From 49bb00b8779483d483355543943d11bb54b858c0 Mon Sep 17 00:00:00 2001 From: Govind Singh Date: Thu, 7 Sep 2017 20:19:24 +0530 Subject: [PATCH] ath10k: Destroy QMI handle during driver unload QMI handle was not destroyed during unload and server exit and resulting in qmi handle leak. Fix this problem by destroying the QMI handle during driver unload and server exit. Change-Id: I7557de7c2ff2cb7d82d6e8a3480e8d5f4be6a5f4 Signed-off-by: Govind Singh --- drivers/net/wireless/ath/ath10k/qmi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/qmi.c b/drivers/net/wireless/ath/ath10k/qmi.c index 10223605b027..dd310d5a7028 100644 --- a/drivers/net/wireless/ath/ath10k/qmi.c +++ b/drivers/net/wireless/ath/ath10k/qmi.c @@ -719,6 +719,7 @@ static int ath10k_snoc_driver_event_server_exit(struct ath10k *ar) atomic_set(&qmi_cfg->fw_ready, 0); qmi_cfg->msa_ready = false; atomic_set(&qmi_cfg->server_connected, 0); + qmi_handle_destroy(qmi_cfg->wlfw_clnt); return 0; } @@ -896,5 +897,6 @@ void ath10k_snoc_stop_qmi_service(struct ath10k *ar) WLFW_SERVICE_INS_ID_V01, &qmi_cfg->wlfw_clnt_nb); destroy_workqueue(qmi_cfg->event_wq); + qmi_handle_destroy(qmi_cfg->wlfw_clnt); qmi_cfg = NULL; }