diff options
Diffstat (limited to 'drivers/pci/controller/dwc/pcie-qcom.c')
| -rw-r--r-- | drivers/pci/controller/dwc/pcie-qcom.c | 14 | 
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c index 1c3d1116bb60..c19cd506ed3f 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -1343,7 +1343,7 @@ static int qcom_pcie_config_sid_sm8250(struct qcom_pcie *pcie)  	/* Look for an available entry to hold the mapping */  	for (i = 0; i < nr_map; i++) { -		u16 bdf_be = cpu_to_be16(map[i].bdf); +		__be16 bdf_be = cpu_to_be16(map[i].bdf);  		u32 val;  		u8 hash; @@ -1534,6 +1534,12 @@ static int qcom_pcie_probe(struct platform_device *pdev)  	const struct qcom_pcie_cfg *pcie_cfg;  	int ret; +	pcie_cfg = of_device_get_match_data(dev); +	if (!pcie_cfg || !pcie_cfg->ops) { +		dev_err(dev, "Invalid platform data\n"); +		return -EINVAL; +	} +  	pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL);  	if (!pcie)  		return -ENOMEM; @@ -1553,12 +1559,6 @@ static int qcom_pcie_probe(struct platform_device *pdev)  	pcie->pci = pci; -	pcie_cfg = of_device_get_match_data(dev); -	if (!pcie_cfg || !pcie_cfg->ops) { -		dev_err(dev, "Invalid platform data\n"); -		return -EINVAL; -	} -  	pcie->ops = pcie_cfg->ops;  	pcie->pipe_clk_need_muxing = pcie_cfg->pipe_clk_need_muxing;  |