瀏覽代碼

qcacld-3.0: Add check for return value

Currently in cds_enable, no check is performed against the return
value of dispatcher_psoc_enable. Add it accordingly.

Change-Id: Ie8119b5581fb13723dd5cd3c7e22477df51005f4
CRs-Fixed: 2168212
Min Liu 7 年之前
父節點
當前提交
81f2ed3f2f
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      core/cds/src/cds_api.c

+ 6 - 1
core/cds/src/cds_api.c

@@ -953,7 +953,12 @@ QDF_STATUS cds_enable(struct wlan_objmgr_psoc *psoc)
 	QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO,
 		  "%s: CDS Start is successful!!", __func__);
 
-	dispatcher_psoc_enable(psoc);
+	qdf_status = dispatcher_psoc_enable(psoc);
+	if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
+		QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_FATAL,
+			  "%s: dispatcher_psoc_enable failed", __func__);
+		goto err_soc_target_detach;
+	}
 
 	/* Trigger psoc enable for CLD components */
 	hdd_component_psoc_enable(psoc);