From 4fc72d427309519b5f292eb7f916c2eae3ac377f Mon Sep 17 00:00:00 2001 From: Yu Wang Date: Mon, 10 Aug 2020 13:38:21 +0800 Subject: [PATCH] qcacld-3.0: fix code defects for spectral callback registering Declaring variable spectral_cb without initializer in sme_register_spectral_cb, spectral_cb.vdev_get_chan_freq_seq2 will be used uninitialized. To fix it, initialize spectral_cb when declaring. CRs-Fixed: 2751599 Change-Id: I2c5cd5a85b54dcbda3059bfd528cd18626b6b316 --- core/sme/src/common/sme_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index 8b06286433eb..dc887e541574 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -1192,7 +1192,7 @@ QDF_STATUS sme_get_valid_channels(uint32_t *ch_freq_list, uint32_t *list_len) #ifdef WLAN_CONV_SPECTRAL_ENABLE static QDF_STATUS sme_register_spectral_cb(struct mac_context *mac_ctx) { - struct spectral_legacy_cbacks spectral_cb; + struct spectral_legacy_cbacks spectral_cb = {0}; QDF_STATUS status; spectral_cb.vdev_get_chan_freq = sme_get_oper_chan_freq;