memory: of_memory: Silence uninitialized variable warning
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 15 Apr 2016 14:50:32 +0000 (17:50 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 May 2016 21:20:04 +0000 (14:20 -0700)
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>
drivers/memory/of_memory.c

index 60074351f17ecfe8ef0806299deff2fdb5fa70b3..9daf94bb8f27fcfe39391d0d78e9e9f61820f7bd 100644 (file)
@@ -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: