drm/msm: Check for NULL before calling prepare_commit()

Add a NULL check before calling prepare_commit() in
msm_atomic_commit_tail()

Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org>
Patchwork: https://patchwork.freedesktop.org/patch/523604/
Link: https://lore.kernel.org/r/20230221184256.1436-3-quic_jesszhan@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
This commit is contained in:
Jessica Zhang 2023-02-21 10:42:54 -08:00 committed by Dmitry Baryshkov
parent 3eeca5e5f3
commit 078f6ec865
1 changed files with 2 additions and 1 deletions

View File

@ -205,7 +205,8 @@ void msm_atomic_commit_tail(struct drm_atomic_state *state)
* Now that there is no in-progress flush, prepare the
* current update:
*/
kms->funcs->prepare_commit(kms, state);
if (kms->funcs->prepare_commit)
kms->funcs->prepare_commit(kms, state);
/*
* Push atomic updates down to hardware: