From: Sean Paul <sean@poorly.run>
To: dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org
Cc: Sean Paul <seanpaul@chromium.org>,
Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
linux-arm-msm@vger.kernel.org
Subject: [PATCH 03/13] drm/msm/phy/dsi_phy: Set pll to NULL in case initialization fails
Date: Mon, 17 Jun 2019 16:09:17 -0400 [thread overview]
Message-ID: <20190617200920.133104-1-sean@poorly.run> (raw)
In-Reply-To: <20190617200405.131843-1-sean@poorly.run>
From: Sean Paul <seanpaul@chromium.org>
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 :(
Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
index 1760483b247e..6491b0ceab23 100644
--- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
+++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
@@ -616,10 +616,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);
--
Sean Paul, Software Engineer, Google / Chromium OS
next prev parent reply other threads:[~2019-06-17 20:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-17 20:03 [RESEND PATCH 01/13] drm/msm/dpu: Remove call to drm_mode_set_crtcinfo Sean Paul
2019-06-17 20:03 ` [RESEND PATCH 02/13] drm/msm/dpu: Fix mmu init/destroy functions Sean Paul
2019-06-17 20:09 ` Sean Paul [this message]
2019-06-17 20:12 ` [PATCH 04/13] drm/msm/dsi_pll_10nm: Release clk hw on destroy and failure Sean Paul
2019-06-17 20:12 ` [PATCH 05/13] drm/msm/dsi_pll_10nm: Remove impossible check Sean Paul
2019-06-17 20:12 ` [PATCH 06/13] drm/msm: Depopulate platform on probe failure Sean Paul
2019-06-17 20:12 ` [PATCH 07/13] drm/msm/dsi: Split mode_flags out of msm_dsi_host_get_panel() Sean Paul
2019-06-17 20:12 ` [PATCH 08/13] drm/msm/dsi: Don't store dsi host mode_flags in msm_dsi Sean Paul
2019-06-17 20:12 ` [PATCH 09/13] drm/msm/dsi: Pull out panel init code into function Sean Paul
2019-06-17 20:12 ` [PATCH 10/13] drm/msm/dsi: Simplify the logic in msm_dsi_manager_panel_init() Sean Paul
2019-06-17 20:12 ` [PATCH 11/13] drm/msm/dsi: Use the new setup_encoder function in attach_dsi_device Sean Paul
2019-06-17 20:12 ` [PATCH 12/13] drm/msm/dsi: Move dsi panel init into modeset init path Sean Paul
2019-06-17 20:12 ` [PATCH 13/13] drm/msm/dsi: Move setup_encoder to modeset_init Sean Paul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190617200920.133104-1-sean@poorly.run \
--to=sean@poorly.run \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=robdclark@gmail.com \
--cc=seanpaul@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).