Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Christophe JAILLET and committed by
Helge Deller
af11f317 31231092

+1 -1
+1 -1
drivers/video/of_display_timing.c
··· 199 199 struct display_timing *dt; 200 200 int r; 201 201 202 - dt = kzalloc(sizeof(*dt), GFP_KERNEL); 202 + dt = kmalloc(sizeof(*dt), GFP_KERNEL); 203 203 if (!dt) { 204 204 pr_err("%pOF: could not allocate display_timing struct\n", 205 205 np);