drm/mediatek: mtk_drm_plane: Use kmalloc in mtk_plane_duplicate_state
There is no need to zero out the newly allocated memory because we are duplicating all members of struct mtk_plane_state: switch to kmalloc to save some overhead. Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20220118133759.112458-1-angelogioacchino.delregno@collabora.com/ Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
This commit is contained in:
parent
3123109284
commit
d327bc37c1
@ -57,7 +57,7 @@ static struct drm_plane_state *mtk_plane_duplicate_state(struct drm_plane *plane
|
||||
struct mtk_plane_state *old_state = to_mtk_plane_state(plane->state);
|
||||
struct mtk_plane_state *state;
|
||||
|
||||
state = kzalloc(sizeof(*state), GFP_KERNEL);
|
||||
state = kmalloc(sizeof(*state), GFP_KERNEL);
|
||||
if (!state)
|
||||
return NULL;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user