From 223c1e5865ef108bcd4d3b611a26ce640c6ea07f Mon Sep 17 00:00:00 2001 From: Jia Ding Date: Wed, 5 Aug 2020 13:11:03 +0800 Subject: [PATCH] qcacmn: Fix uninitialized scalar variable Fix below static code analysis case. uninit_use_in_call: Using uninitialized value target_type when calling hif_get_device_type. Change-Id: I0d072dd7dd92addeb986d088a7ee85ff13e15d16 CRs-Fixed: 2748473 --- hif/src/pcie/if_pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hif/src/pcie/if_pci.c b/hif/src/pcie/if_pci.c index ae91da7a51c8..b96b767e154c 100644 --- a/hif/src/pcie/if_pci.c +++ b/hif/src/pcie/if_pci.c @@ -3311,7 +3311,8 @@ QDF_STATUS hif_pci_enable_bus(struct hif_softc *ol_sc, enum hif_enable_type type) { int ret = 0; - uint32_t hif_type, target_type; + uint32_t hif_type; + uint32_t target_type = TARGET_TYPE_UNKNOWN; struct hif_pci_softc *sc = HIF_GET_PCI_SOFTC(ol_sc); struct hif_opaque_softc *hif_hdl = GET_HIF_OPAQUE_HDL(ol_sc); uint16_t revision_id = 0;