From: Christophe JAILLET Date: Tue, 22 Mar 2022 20:33:38 +0000 (+0100) Subject: video: fbdev: of: display_timing: Remove a redundant zeroing of memory X-Git-Tag: v6.6.17~7677^2~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=af11f31715b50ce77e50fa393bc530df0f33960b;p=platform%2Fkernel%2Flinux-rpi.git video: fbdev: of: display_timing: Remove a redundant zeroing of memory of_parse_display_timing() already call memset(0) on its 2nd argument, so there is no need to clear it explicitly before calling this function. Use kmalloc() instead of kzalloc() to save a few cycles. Signed-off-by: Christophe JAILLET Signed-off-by: Helge Deller --- diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c index f93b6ab..bebd371 100644 --- a/drivers/video/of_display_timing.c +++ b/drivers/video/of_display_timing.c @@ -199,7 +199,7 @@ struct display_timings *of_get_display_timings(const struct device_node *np) struct display_timing *dt; int r; - dt = kzalloc(sizeof(*dt), GFP_KERNEL); + dt = kmalloc(sizeof(*dt), GFP_KERNEL); if (!dt) { pr_err("%pOF: could not allocate display_timing struct\n", np);