diff options
author | Sean Paul <seanpaul@chromium.org> | 2018-07-30 17:26:53 +0200 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2018-10-04 02:24:49 +0200 |
commit | aea24171c85edbff1e021016e8ea1bf64b89a4f8 (patch) | |
tree | cacafec9911892aea8ea4f45f89fbb8440f2627b /drivers/gpu/drm/msm/dsi/dsi.c | |
parent | Merge branch 'drm-next-4.20' of git://people.freedesktop.org/~agd5f/linux int... (diff) | |
download | linux-aea24171c85edbff1e021016e8ea1bf64b89a4f8.tar.xz linux-aea24171c85edbff1e021016e8ea1bf64b89a4f8.zip |
drm/msm: dsi: Initialize msm_dsi->id to -1
Currently msm_dsi->id is initialized to 0 during kzalloc. If bind fails
for a secondary dsi device before its id can be properly set (such as
during dt parsing), the id will point to the primary dsi device, causing
its reference to be removed from dsi_manager's global (msm_dsim_glb)
array.
This patch initializes the id to -1 and checks for negative in the
manager cleanup.
Cc: Doug Anderson <dianders@chromium.org>
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/dsi/dsi.c')
-rw-r--r-- | drivers/gpu/drm/msm/dsi/dsi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c index ff8164cc6738..ee07d58c2d97 100644 --- a/drivers/gpu/drm/msm/dsi/dsi.c +++ b/drivers/gpu/drm/msm/dsi/dsi.c @@ -83,6 +83,7 @@ static struct msm_dsi *dsi_init(struct platform_device *pdev) return ERR_PTR(-ENOMEM); DBG("dsi probed=%p", msm_dsi); + msm_dsi->id = -1; msm_dsi->pdev = pdev; platform_set_drvdata(pdev, msm_dsi); |