浏览代码

PCI: qcom: Fix pp->dev usage before assignment

Initialize pp->dev in qcom_pcie_probe() before calling get_resources(),
which uses it.

[bhelgaas: changelog]
Fixes: e6a087eeaf91 ("PCI: qcom: Remove redundant struct qcom_pcie.dev")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Srinivas Kandagatla 8 年之前
父节点
当前提交
ad110449e2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/pci/host/pcie-qcom.c

+ 1 - 1
drivers/pci/host/pcie-qcom.c

@@ -533,11 +533,11 @@ static int qcom_pcie_probe(struct platform_device *pdev)
 	if (IS_ERR(pcie->phy))
 	if (IS_ERR(pcie->phy))
 		return PTR_ERR(pcie->phy);
 		return PTR_ERR(pcie->phy);
 
 
+	pp->dev = dev;
 	ret = pcie->ops->get_resources(pcie);
 	ret = pcie->ops->get_resources(pcie);
 	if (ret)
 	if (ret)
 		return ret;
 		return ret;
 
 
-	pp->dev = dev;
 	pp->root_bus_nr = -1;
 	pp->root_bus_nr = -1;
 	pp->ops = &qcom_pcie_dw_ops;
 	pp->ops = &qcom_pcie_dw_ops;