summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/msm/dsi/pll
diff options
context:
space:
mode:
authorLloyd Atkinson <latkinso@codeaurora.org>2018-01-17 00:26:01 +0300
committerRob Clark <robdclark@gmail.com>2018-02-20 18:41:20 +0300
commitf0efc831d9439589efaf6406695470eca93ba08d (patch)
treec08b08600d233fc1e5607900b874e2e2c7f2e9d0 /drivers/gpu/drm/msm/dsi/pll
parent933519a5a269d8460450545adefcb5caec622cac (diff)
downloadlinux-f0efc831d9439589efaf6406695470eca93ba08d.tar.xz
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/pll')
-rw-r--r--drivers/gpu/drm/msm/dsi/pll/dsi_pll.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/dsi/pll/dsi_pll.c b/drivers/gpu/drm/msm/dsi/pll/dsi_pll.c
index bc289f5c9078..491f08dce969 100644
--- a/drivers/gpu/drm/msm/dsi/pll/dsi_pll.c
+++ b/drivers/gpu/drm/msm/dsi/pll/dsi_pll.c
@@ -173,7 +173,7 @@ struct msm_dsi_pll *msm_dsi_pll_init(struct platform_device *pdev,
if (IS_ERR(pll)) {
dev_err(dev, "%s: failed to init DSI PLL\n", __func__);
- return NULL;
+ return pll;
}
pll->type = type;