forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
....@@ -803,6 +803,8 @@
803803
804804 mtk_crtc->planes = devm_kcalloc(dev, num_comp_planes,
805805 sizeof(struct drm_plane), GFP_KERNEL);
806
+ if (!mtk_crtc->planes)
807
+ return -ENOMEM;
806808
807809 for (i = 0; i < mtk_crtc->ddp_comp_nr; i++) {
808810 ret = mtk_drm_crtc_init_comp_planes(drm_dev, mtk_crtc, i,