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
这个提交包含在:
jiad
2018-01-03 12:35:39 +08:00
提交者 snandini
父节点 8139413318
当前提交 8245c03b69

查看文件

@@ -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);