From ec6e4416b1833abbdf54a40a6908866c7e06c585 Mon Sep 17 00:00:00 2001 From: Tony Truong Date: Thu, 18 Feb 2021 19:39:05 -0800 Subject: [PATCH] switch: qcom: initialize parb_phase to 0 If none of the "if" conditions are met, an uninitialized parb_phase will be used. Initialize parb_phase so that it can be handled properly. Change-Id: I682ece7330cd257566ea740c4498bc786ae95588 Signed-off-by: Tony Truong --- drivers/pci/switch/switch-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/switch/switch-qcom.c b/drivers/pci/switch/switch-qcom.c index 99412c37d8ae..fce2d25fd816 100644 --- a/drivers/pci/switch/switch-qcom.c +++ b/drivers/pci/switch/switch-qcom.c @@ -42,7 +42,7 @@ static int config_port_arbitration(struct device *dev, int parb_select, struct pci_dev *pcidev = to_pci_dev(dev); int i, pos, size; int timeout = 100; - u32 parb_offset, parb_phase, parb_size; + u32 parb_offset, parb_phase = 0, parb_size; u32 val; u16 status;