diff options
| author | AngeloGioacchino Del Regno <[email protected]> | 2022-01-18 14:37:58 +0100 |
|---|---|---|
| committer | Chun-Kuang Hu <[email protected]> | 2022-04-06 06:27:23 +0800 |
| commit | d327bc37c16a9c55e7d243ada2a58ba764e2bc58 (patch) | |
| tree | 1cde1f03ddfa4da06ae63793feb91cf69ce7fba5 | |
| parent | 3123109284176b1532874591f7c81f3837bbdc17 (diff) | |
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/[email protected]/
Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
Signed-off-by: Chun-Kuang Hu <[email protected]>
| -rw-r--r-- | drivers/gpu/drm/mediatek/mtk_drm_plane.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_plane.c b/drivers/gpu/drm/mediatek/mtk_drm_plane.c index 075747a6d4aa..e5fae4ec2337 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_plane.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_plane.c @@ -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; |