PCI: exynos: Fix a potential init_clk_resources NULL pointer dereference
authorJaehoon Chung <jh80.chung@samsung.com>
Mon, 22 Jan 2018 02:28:54 +0000 (11:28 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 Jul 2018 12:28:42 +0000 (14:28 +0200)
commitdc3782a3e9c61872df8c8ed395b60d3b7ad782b8
treee234e5fc13d7b38887a714318538f72bf443615d
parentb1c3ce0cfff275ee2e88fe505a8f44712303f895
PCI: exynos: Fix a potential init_clk_resources NULL pointer dereference

commit b5d6bc90c9129279d363ccbc02ad11e7b657c0b4 upstream.

In order to avoid triggering a NULL pointer dereference in
exynos_pcie_probe() a check must be put in place to detect if
the init_clk_resources hook is initialized before calling it.

Add the respective function pointer check in exynos_pcie_probe().

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
[lorenzo.pieralisi@arm.com: rewrote the commit log]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pci/dwc/pci-exynos.c