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

memory: of_memory: Silence uninitialized variable warning

Presumably we never use the default: case statement which prints a
warning message. But my static checker complains that if we do, we will
hit an uninitialized variable warning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Dan Carpenter and committed by
Greg Kroah-Hartman
ae53e374 3385af8c

+1 -1
+1 -1
drivers/memory/of_memory.c
··· 109 109 struct lpddr2_timings *timings = NULL; 110 110 u32 arr_sz = 0, i = 0; 111 111 struct device_node *np_tim; 112 - char *tim_compat; 112 + char *tim_compat = NULL; 113 113 114 114 switch (device_type) { 115 115 case DDR_TYPE_LPDDR2_S2: