qcacmn: Fix uninitialize variables in few policy manager APIs
Few variables are left uninitialized and they are being used with some random value. Fix by initializing to default value. CRs-Fixed: 2232791 Change-Id: I3351cae52c58e963601d53376f42ca8ebf0d3b9a
This commit is contained in:
@@ -1357,7 +1357,7 @@ policy_mgr_get_nondfs_preferred_channel(struct wlan_objmgr_psoc *psoc,
|
|||||||
* under 5G MCC scenario
|
* under 5G MCC scenario
|
||||||
*/
|
*/
|
||||||
uint8_t channel = PM_24_GHZ_CHANNEL_6;
|
uint8_t channel = PM_24_GHZ_CHANNEL_6;
|
||||||
uint32_t i, pcl_len;
|
uint32_t i, pcl_len = 0;
|
||||||
|
|
||||||
pm_ctx = policy_mgr_get_context(psoc);
|
pm_ctx = policy_mgr_get_context(psoc);
|
||||||
if (!pm_ctx) {
|
if (!pm_ctx) {
|
||||||
|
@@ -536,8 +536,8 @@ static void utils_dfs_get_channel_list(struct wlan_objmgr_pdev *pdev,
|
|||||||
static void utils_dfs_get_chan_list(struct wlan_objmgr_pdev *pdev,
|
static void utils_dfs_get_chan_list(struct wlan_objmgr_pdev *pdev,
|
||||||
struct dfs_channel *chan_list, uint32_t *num_chan)
|
struct dfs_channel *chan_list, uint32_t *num_chan)
|
||||||
{
|
{
|
||||||
uint8_t pcl_ch[NUM_CHANNELS];
|
uint8_t pcl_ch[NUM_CHANNELS] = {0};
|
||||||
uint8_t weight_list[NUM_CHANNELS];
|
uint8_t weight_list[NUM_CHANNELS] = {0};
|
||||||
uint32_t len;
|
uint32_t len;
|
||||||
uint32_t weight_len;
|
uint32_t weight_len;
|
||||||
int i;
|
int i;
|
||||||
|
Reference in New Issue
Block a user