Skip to contentSkip to conversation

drm/sun4i: mixer: Fix layer init code

PATCH Applied Jernej Skrabec 2 participants 3 messages Feb 18 – Feb 24

Subsystems (5)
lore
Share & tools
lore

Jernej Skrabec

author maintainer
#0 lore raw

PATCH 1/1 drm/sun4i: mixer: Fix layer init code

Code refactoring dropped extra NULL sentinel entry at the end of the drm planes array.

Add it back.

---
 drivers/gpu/drm/sun4i/sun8i_mixer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/sun4i/sun8i_mixer.c +1 -1
index ce9c155bfad7..02acc7cbdb97 100644
@@ -321,7 +321,7 @@ static struct drm_plane **sun8i_layers_init(struct drm_device *drm,
 	unsigned int phy_index;
 	int i;
 
-	planes = devm_kcalloc(drm->dev, plane_cnt, sizeof(*planes), GFP_KERNEL);
+	planes = devm_kcalloc(drm->dev, plane_cnt + 1, sizeof(*planes), GFP_KERNEL);
 	if (!planes)
 		return ERR_PTR(-ENOMEM);
 
Signature · 1 line
2.53.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Jernej Skrabec

Code refactoring dropped extra NULL sentinel entry at the end of the drm planes array.

Add it back.

---

maintainer Applied
#2 lore raw
In reply to Jernej Skrabec
Quoted 6 lines · Jernej Skrabec

Code refactoring dropped extra NULL sentinel entry at the end of the drm planes array.

Add it back.

Applied to drm-misc-next in drm-misc, thanks!

[1/1] drm/sun4i: mixer: Fix layer init code

      commit: 744629904c68bde847c31819f23482d09152f810

Best regards,

Signature · 1 line
Chen-Yu Tsai <[email protected]>