Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e57e5069 authored by Yue Ma's avatar Yue Ma
Browse files

cnss2: Destroy QMI handle when QMI service exits



Currently QMI handle will be leaked when QMI service disconnects
since new handle will be created when reconnection happens. Destroy
it to avoid the leak.

Change-Id: Ic715ce6b86dcb646d7c7312cb811e57145e1337c
Signed-off-by: default avatarYue Ma <yuem@codeaurora.org>
parent aa2cd681
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -958,6 +958,9 @@ int cnss_wlfw_server_exit(struct cnss_plat_data *plat_priv)
	if (!plat_priv)
		return -ENODEV;

	qmi_handle_destroy(plat_priv->qmi_wlfw_clnt);
	plat_priv->qmi_wlfw_clnt = NULL;

	clear_bit(CNSS_FW_READY, &plat_priv->driver_state);
	clear_bit(CNSS_FW_MEM_READY, &plat_priv->driver_state);
	clear_bit(CNSS_QMI_WLFW_CONNECTED, &plat_priv->driver_state);