summaryrefslogtreecommitdiff
path: root/hif
diff options
context:
space:
mode:
authorjiad <jiad@codeaurora.org>2018-01-03 12:35:39 +0800
committersnandini <snandini@codeaurora.org>2018-01-24 02:27:05 -0800
commit8245c03b690fc5c4fbf208a13ae3f4b1b62af13e (patch)
tree237ea33b6ce8a7f8fabbfcea59e75f5f86f1f054 /hif
parent8139413318a56705f63fb2c522453a616fa0d66f (diff)
downloadqca-wfi-host-cmn-8245c03b690fc5c4fbf208a13ae3f4b1b62af13e.tar.gz
qcacmn: Fix may be used uninitialized compile error
Build option -Werror=maybe-uninitialized throws may be used uninitialized error. Fix is to initialize varibles to 0 before being used. Change-Id: I05a17fcb3dd666a77e14ef6469305fde541fb740 CRs-Fixed: 2165500
Diffstat (limited to 'hif')
-rw-r--r--hif/src/pcie/if_pci.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/hif/src/pcie/if_pci.c b/hif/src/pcie/if_pci.c
index 6fbbd4722..5f336184b 100644
--- a/hif/src/pcie/if_pci.c
+++ b/hif/src/pcie/if_pci.c
@@ -167,8 +167,8 @@ irqreturn_t hif_pci_legacy_ce_interrupt_handler(int irq, void *arg)
struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(arg);
volatile int tmp;
- uint16_t val;
- uint32_t bar0;
+ uint16_t val = 0;
+ uint32_t bar0 = 0;
uint32_t fw_indicator_address, fw_indicator;
bool ssr_irq = false;
unsigned int host_cause, host_enable;
@@ -629,7 +629,7 @@ int hif_check_fw_reg(struct hif_opaque_softc *hif_ctx)
int hif_check_soc_status(struct hif_opaque_softc *hif_ctx)
{
struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx);
- uint16_t device_id;
+ uint16_t device_id = 0;
uint32_t val;
uint16_t timeout_count = 0;
struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(scn);
@@ -2085,7 +2085,7 @@ static int hif_enable_pci(struct hif_pci_softc *sc,
{
void __iomem *mem;
int ret = 0;
- uint16_t device_id;
+ uint16_t device_id = 0;
struct hif_softc *ol_sc = HIF_GET_SOFTC(sc);
pci_read_config_word(pdev, PCI_DEVICE_ID, &device_id);
@@ -2758,7 +2758,7 @@ int hif_pci_bus_suspend(struct hif_softc *scn)
*/
static int __hif_check_link_status(struct hif_softc *scn)
{
- uint16_t dev_id;
+ uint16_t dev_id = 0;
struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(scn);
struct hif_driver_state_callbacks *cbk = hif_get_callbacks_handle(scn);
@@ -3204,8 +3204,8 @@ static inline void hif_msm_pcie_debug_info(struct hif_pci_softc *sc) {};
*/
static int hif_log_soc_wakeup_timeout(struct hif_pci_softc *sc)
{
- uint16_t val;
- uint32_t bar;
+ uint16_t val = 0;
+ uint32_t bar = 0;
struct hif_opaque_softc *hif_hdl = GET_HIF_OPAQUE_HDL(sc);
struct hif_softc *scn = HIF_GET_SOFTC(sc);
struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(sc);