Skip to content
Commit aea24171 authored by Sean Paul's avatar Sean Paul Committed by Rob Clark
Browse files

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: default avatarAbhinav Kumar <abhinavk@codeaurora.org>
Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>

Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
parent 87c2ee74
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment