瀏覽代碼

qcacld-3.0: Add NULL check for hif_ctx

This change is to add NULL check for hif_ctx.

Change-Id: Ie8d13e13a7dcb7071a2e492c4e34a26b96b01d1c
CRs-Fixed: 3776529
Shashank Reddy Vulupala 1 年之前
父節點
當前提交
3ffb15e2b9
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      components/pmo/core/src/wlan_pmo_suspend_resume.c

+ 6 - 0
components/pmo/core/src/wlan_pmo_suspend_resume.c

@@ -1394,6 +1394,12 @@ QDF_STATUS pmo_core_psoc_send_host_wakeup_ind_to_fw(
 
 	hif_ctx = pmo_core_psoc_get_hif_handle(psoc);
 
+	if (!hif_ctx) {
+		pmo_err("hif_ctx is NULL");
+		status = QDF_STATUS_E_INVAL;
+		goto out;
+	}
+
 	hif_set_ep_intermediate_vote_access(hif_ctx);
 
 	qdf_event_reset(&psoc_ctx->wow.target_resume);