Commit 7896e223 authored by Sean Paul's avatar Sean Paul

drm/msm/phy/dsi_phy: Set pll to NULL in case initialization fails

We have if (!phy->pll) checks scattered through the driver and if
phy->pll is an error pointer, those checks will pass and bad things will
happen :(
Reviewed-by: default avatarRob Clark <robdclark@chromium.org>
Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190617200920.133104-1-sean@poorly.run
parent a93be1fc
......@@ -618,10 +618,12 @@ 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 (IS_ERR_OR_NULL(phy->pll))
if (IS_ERR_OR_NULL(phy->pll)) {
DRM_DEV_INFO(dev,
"%s: pll init failed: %ld, need separate pll clk driver\n",
__func__, PTR_ERR(phy->pll));
phy->pll = NULL;
}
dsi_phy_disable_resource(phy);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment