summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhaoyang Liu <zhaoyang@codeaurora.org>2018-01-05 10:43:56 +0800
committersnandini <snandini@codeaurora.org>2018-01-08 01:33:25 -0800
commitea99108ff6463197c4d2535b7a7dbd80385c8014 (patch)
tree761561fce11ce48de569f9a601cc457434137a84
parentd23f9c758622c05cfd9ac21cf6c29c88ea56b150 (diff)
qcacld-3.0: remove hdd validate context check in power stats debugfs
Remove wlan_hdd_validate_context api invoked in power stats debugfs. Context validate checker would return failure while driver is in loading or unloading state, this results to power stats debugfs initialization failure and ll_stats debug file not getting generated. Change-Id: I1ca98ce4da648a559cf3b6820f6a2da588378921 CRs-Fixed: 2167332
-rw-r--r--core/hdd/src/wlan_hdd_debugfs.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/core/hdd/src/wlan_hdd_debugfs.c b/core/hdd/src/wlan_hdd_debugfs.c
index 844b566b8262..ace44d369bda 100644
--- a/core/hdd/src/wlan_hdd_debugfs.c
+++ b/core/hdd/src/wlan_hdd_debugfs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -847,10 +847,8 @@ static QDF_STATUS wlan_hdd_init_power_stats_debugfs(hdd_adapter_t *adapter)
return QDF_STATUS_E_FAILURE;
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
- if (wlan_hdd_validate_context(hdd_ctx))
- return QDF_STATUS_E_FAILURE;
-
- mutex_init(&hdd_ctx->power_stats_lock);
+ if (hdd_ctx)
+ mutex_init(&hdd_ctx->power_stats_lock);
return QDF_STATUS_SUCCESS;
}
@@ -866,10 +864,8 @@ static void wlan_hdd_deinit_power_stats_debugfs(hdd_adapter_t *adapter)
hdd_context_t *hdd_ctx;
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
- if (wlan_hdd_validate_context(hdd_ctx))
- return;
-
- mutex_destroy(&hdd_ctx->power_stats_lock);
+ if (hdd_ctx)
+ mutex_destroy(&hdd_ctx->power_stats_lock);
}
#else
static QDF_STATUS wlan_hdd_init_power_stats_debugfs(hdd_adapter_t *adapter)