@@ -264,6 +264,10 @@ static int hisi_pcie_probe(struct platform_device *pdev)
struct device_driver *driver;
int ret;
+ match = of_match_device(driver->of_match_table, dev);
+ if (!match)
+ return -ENODEV;
+
hisi_pcie = devm_kzalloc(dev, sizeof(*hisi_pcie), GFP_KERNEL);
if (!hisi_pcie)
return -ENOMEM;
@@ -272,7 +276,6 @@ static int hisi_pcie_probe(struct platform_device *pdev)
pp->dev = dev;
driver = dev->driver;
- match = of_match_device(driver->of_match_table, dev);
hisi_pcie->soc_ops = (struct pcie_soc_ops *) match->data;
hisi_pcie->subctrl =