drm/msm/dsi: add protection against NULL dsi device
authorAbhinav Kumar <abhinavk@codeaurora.org>
Sat, 1 Jun 2019 02:43:27 +0000 (19:43 -0700)
committerRob Clark <robdclark@chromium.org>
Tue, 18 Jun 2019 21:02:26 +0000 (14:02 -0700)
commit61f0479757aa4371801b9d552e85dd6d6327d036
tree1c537a49a71090e981d30cd4bac926bf5393a2b4
parent6672e11cad662ce6631e04c38f92a140a99c042c
drm/msm/dsi: add protection against NULL dsi device

When panel probe happens after DSI probe, the DSI probe is deferred as
per current design. In the probe defer path dsi device is destroyed.
This NULL dsi device could be deferenced by the panel probe in the
mipi_dsi_attach path.

Check for NULL dsi device before accessing it.

Changes in v2:
 - Add more comments on how this NULL pointer situation will be hit

Reported-by: Jeffrey Hugo <jhugo@codeaurora.org>
Tested-by: Jeffrey Hugo <jhugo@codeaurora.org>
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/dsi/dsi_manager.c