summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/kmb/kmb_plane.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/kmb/kmb_plane.c')
-rw-r--r--drivers/gpu/drm/kmb/kmb_plane.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/kmb/kmb_plane.c b/drivers/gpu/drm/kmb/kmb_plane.c
index 8448d1edb553..be8eea3830c1 100644
--- a/drivers/gpu/drm/kmb/kmb_plane.c
+++ b/drivers/gpu/drm/kmb/kmb_plane.c
@@ -114,6 +114,9 @@ static void kmb_plane_atomic_disable(struct drm_plane *plane,
kmb = to_kmb(plane->dev);
+ if (WARN_ON(plane_id >= KMB_MAX_PLANES))
+ return;
+
switch (plane_id) {
case LAYER_0:
kmb->plane_status[plane_id].ctrl = LCD_CTRL_VL1_ENABLE;