]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/pci/dwc/pci-exynos.c
PCI: exynos: Fix a potential init_clk_resources NULL pointer dereference
[mirror_ubuntu-bionic-kernel.git] / drivers / pci / dwc / pci-exynos.c
index 5596fdedbb9471c49b4bb73fbc57b5b03170521f..ea03f1ec12a47713f3633816cb6216a92965a629 100644 (file)
@@ -695,7 +695,8 @@ static int __init exynos_pcie_probe(struct platform_device *pdev)
                        return ret;
        }
 
-       if (ep->ops && ep->ops->get_clk_resources) {
+       if (ep->ops && ep->ops->get_clk_resources &&
+                       ep->ops->init_clk_resources) {
                ret = ep->ops->get_clk_resources(ep);
                if (ret)
                        return ret;