* [patch] memory: of_memory: Silence uninitialized variable warning
@ 2016-04-15 14:50 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2016-04-15 14:50 UTC (permalink / raw)
To: linux-kernel, Aneesh V; +Cc: kernel-janitors, Greg Kroah-Hartman
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>
diff --git a/drivers/memory/of_memory.c b/drivers/memory/of_memory.c
index 6007435..9daf94b 100644
--- a/drivers/memory/of_memory.c
+++ b/drivers/memory/of_memory.c
@@ -109,7 +109,7 @@ const struct lpddr2_timings *of_get_ddr_timings(struct device_node *np_ddr,
struct lpddr2_timings *timings = NULL;
u32 arr_sz = 0, i = 0;
struct device_node *np_tim;
- char *tim_compat;
+ char *tim_compat = NULL;
switch (device_type) {
case DDR_TYPE_LPDDR2_S2:
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-04-15 14:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-15 14:50 [patch] memory: of_memory: Silence uninitialized variable warning Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox