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 <christophe.jaillet@wanadoo.fr>
Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
Christophe JAILLET 2022-03-22 21:33:38 +01:00 committed by Helge Deller
parent 3123109284
commit af11f31715

View File

@ -199,7 +199,7 @@ struct display_timings *of_get_display_timings(const struct device_node *np)
struct display_timing *dt; struct display_timing *dt;
int r; int r;
dt = kzalloc(sizeof(*dt), GFP_KERNEL); dt = kmalloc(sizeof(*dt), GFP_KERNEL);
if (!dt) { if (!dt) {
pr_err("%pOF: could not allocate display_timing struct\n", pr_err("%pOF: could not allocate display_timing struct\n",
np); np);