Skip to content

Commit 85c3277

Browse files
jernejskgregkh
authored andcommitted
drm/sun4i: mixer: Fix layer init code
[ Upstream commit 7446299 ] Code refactoring dropped extra NULL sentinel entry at the end of the drm planes array. Add it back. Reported-by: Chen-Yu Tsai <wens@kernel.org> Closes: https://lore.kernel.org/linux-sunxi/CAGb2v65wY2pF6sR+0JgnpLa4ysvjght5hAKDa1RUyo=zEKXreg@mail.gmail.com/ Fixes: 4fa45b0 ("drm/sun4i: layer: move num of planes calc out of layer code") Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com> Reviewed-by: Chen-Yu Tsai <wens@kernel.org> Link: https://patch.msgid.link/20260218183454.7881-1-jernej.skrabec@gmail.com [wens@kernel.org: Fix "Fixes" commit hash] Signed-off-by: Chen-Yu Tsai <wens@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 3c25587 commit 85c3277

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/sun4i/sun8i_mixer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ static struct drm_plane **sun8i_layers_init(struct drm_device *drm,
321321
unsigned int phy_index;
322322
int i;
323323

324-
planes = devm_kcalloc(drm->dev, plane_cnt, sizeof(*planes), GFP_KERNEL);
324+
planes = devm_kcalloc(drm->dev, plane_cnt + 1, sizeof(*planes), GFP_KERNEL);
325325
if (!planes)
326326
return ERR_PTR(-ENOMEM);
327327

0 commit comments

Comments
 (0)