drm/msm/dpu: Avoid a null de-ref while recovering from kms init fail
authorJordan Crouse <jcrouse@codeaurora.org>
Tue, 7 May 2019 19:18:10 +0000 (13:18 -0600)
committerRob Clark <robdclark@chromium.org>
Tue, 18 Jun 2019 20:52:39 +0000 (13:52 -0700)
commitfecabfd9241f6c41ffa975803682028361791cad
treea17af35134bafc9530d4b3b2f9b6e6623976bfe2
parent36415615adf4b55668a99ba4565bdd38733e5bff
drm/msm/dpu: Avoid a null de-ref while recovering from kms init fail

In the failure path for dpu_kms_init() it is possible to get to the MMU
destroy function with uninitialized MMU structs. Check for NULL and skip
if needed.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c