diff options
author | Lloyd Atkinson <latkinso@codeaurora.org> | 2018-01-16 16:26:01 -0500 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2018-02-20 10:41:20 -0500 |
commit | f0efc831d9439589efaf6406695470eca93ba08d (patch) | |
tree | c08b08600d233fc1e5607900b874e2e2c7f2e9d0 /drivers/gpu/drm/msm/dsi/phy | |
parent | 933519a5a269d8460450545adefcb5caec622cac (diff) |
drm/msm/dsi: check for failure on retrieving pll in dsi manager
Make msm_dsi_pll_init consistently return an error code instead
of NULL when pll initialization fails so that later pll
retrieval can check against an error code. Add checks for these
failures after retrieval of src_pll to avoid invalid pointer
dereferences later in msm_dsi_pll_get_clk_provider.
Signed-off-by: Lloyd Atkinson <latkinso@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/dsi/phy')
-rw-r--r-- | drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c index 790ca280cbfdf..c8bfaa7806511 100644 --- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c +++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c @@ -503,10 +503,10 @@ static int dsi_phy_driver_probe(struct platform_device *pdev) goto fail; phy->pll = msm_dsi_pll_init(pdev, phy->cfg->type, phy->id); - if (!phy->pll) + if (IS_ERR_OR_NULL(phy->pll)) dev_info(dev, - "%s: pll init failed, need separate pll clk driver\n", - __func__); + "%s: pll init failed: %ld, need separate pll clk driver\n", + __func__, PTR_ERR(phy->pll)); dsi_phy_disable_resource(phy); |