diff --git a/drivers/net/wireless/cnss2/pci.c b/drivers/net/wireless/cnss2/pci.c index b9450154b6dd..e1c4cbd5846b 100644 --- a/drivers/net/wireless/cnss2/pci.c +++ b/drivers/net/wireless/cnss2/pci.c @@ -4402,6 +4402,11 @@ static int cnss_pci_register_mhi(struct cnss_pci_data *pci_priv) if (!mhi_ctrl->log_buf) cnss_pr_err("Unable to create CNSS MHI IPC log context\n"); + mhi_ctrl->cntrl_log_buf = ipc_log_context_create(CNSS_IPC_LOG_PAGES, + "cnss-mhi-cntrl", 0); + if (!mhi_ctrl->cntrl_log_buf) + cnss_pr_err("Unable to create CNSS MHICNTRL IPC log context\n"); + ret = of_register_mhi_controller(mhi_ctrl); if (ret) { cnss_pr_err("Failed to register to MHI bus, err = %d\n", ret); @@ -4419,6 +4424,8 @@ unreg_mhi: destroy_ipc: if (mhi_ctrl->log_buf) ipc_log_context_destroy(mhi_ctrl->log_buf); + if (mhi_ctrl->cntrl_log_buf) + ipc_log_context_destroy(mhi_ctrl->cntrl_log_buf); kfree(mhi_ctrl->irq); free_mhi_ctrl: mhi_free_controller(mhi_ctrl); @@ -4433,6 +4440,8 @@ static void cnss_pci_unregister_mhi(struct cnss_pci_data *pci_priv) mhi_unregister_mhi_controller(mhi_ctrl); if (mhi_ctrl->log_buf) ipc_log_context_destroy(mhi_ctrl->log_buf); + if (mhi_ctrl->cntrl_log_buf) + ipc_log_context_destroy(mhi_ctrl->cntrl_log_buf); kfree(mhi_ctrl->irq); mhi_free_controller(mhi_ctrl); }