소스 검색

qcacld-3.0: Do not remove pm qos notifier if it's not added

The notifier for pm qos is added when the runtime pm dynamic
is defined, when removing the notifier, we should also check
if the runtime pm dynamic is defined or not. We should not
remove this notifier if it is not defined.

Change-Id: Ic628c6fc38da00b2491355786ff40020d0249bb2
CRs-Fixed: 2622946
Guisen Yang 5 년 전
부모
커밋
eebdeb13dd
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      core/hdd/src/wlan_hdd_main.c

+ 5 - 0
core/hdd/src/wlan_hdd_main.c

@@ -3432,6 +3432,11 @@ static void hdd_wlan_unregister_pm_qos_notifier(struct hdd_context *hdd_ctx)
 {
 	int ret;
 
+	if (hdd_ctx->config->runtime_pm != hdd_runtime_pm_dynamic) {
+		hdd_debug("Dynamic Runtime PM disabled");
+		return;
+	}
+
 	ret = pm_qos_remove_notifier(PM_QOS_CPU_DMA_LATENCY,
 				     &hdd_ctx->pm_qos_notifier);
 	if (ret)