From b4ea80e0301768ced300227255a04310fa97e172 Mon Sep 17 00:00:00 2001 From: jiad Date: Fri, 2 Nov 2018 15:52:22 +0800 Subject: [PATCH] qcacmn: Fix maybe-uninitialized build error This change fixes build errors with compiler option -Werror=maybe-uninitialized. Change-Id: Ieff271ed61575c9e60ce73f5145fff2c2d6dfa24 CRs-Fixed: 2346019 --- umac/dfs/core/src/filtering/dfs_radar.c | 1 - umac/dfs/core/src/misc/dfs.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/umac/dfs/core/src/filtering/dfs_radar.c b/umac/dfs/core/src/filtering/dfs_radar.c index 35d2643c72f8..f7794dc6f7f4 100644 --- a/umac/dfs/core/src/filtering/dfs_radar.c +++ b/umac/dfs/core/src/filtering/dfs_radar.c @@ -305,7 +305,6 @@ int dfs_set_thresholds(struct wlan_dfs *dfs, const uint32_t threshtype, int dfs_get_thresholds(struct wlan_dfs *dfs, struct wlan_dfs_phyerr_param *param) { - qdf_mem_zero(param, sizeof(*param)); lmac_dfs_get_thresholds(dfs->dfs_pdev_obj, param); return 1; diff --git a/umac/dfs/core/src/misc/dfs.c b/umac/dfs/core/src/misc/dfs.c index 5cffc8b17cc1..261702a980d9 100644 --- a/umac/dfs/core/src/misc/dfs.c +++ b/umac/dfs/core/src/misc/dfs.c @@ -411,6 +411,8 @@ int dfs_control(struct wlan_dfs *dfs, *outsize = sizeof(struct dfs_ioctl_params); dfsparams = (struct dfs_ioctl_params *) outdata; + qdf_mem_zero(&peout, sizeof(struct wlan_dfs_phyerr_param)); + /* Fetch the DFS thresholds using the internal representation */ (void) dfs_get_thresholds(dfs, &peout);