hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
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,