diff options
author | Afzal Mohammed <afzal@ti.com> | 2013-05-28 02:24:48 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2013-07-04 07:24:42 -0400 |
commit | 37bd6ca8ab6c103603e04e320d3debeb4596e481 (patch) | |
tree | 17702135c93bfdda942260a5837c35f1c4d45276 /arch/arm | |
parent | ddcf6600b133697adbafd96e080818bdc0dfd028 (diff) |
ARM: OMAP2+: timer: initialize before using oh_name
of_property_read_string_index(...,&oh_name) in omap_dm_timer_init_one
does not alter the value of 'oh_name' even if the relevant function
fails and as 'oh_name' in stack may have a non-zero value, it would
be misunderstood by timer code that DT has specified "ti,hwmod"
property for timer. 'oh_name' in this scenario would be a junk value,
this would result in module not being enabled by hwmod API's for
timer, and in turn crash.
Signed-off-by: Afzal Mohammed <afzal@ti.com>
Acked-by: Jon Hunter <jgchunter@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 3bdb0fb02028..5f148e721790 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
@@ -220,7 +220,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer, | |||
220 | int posted) | 220 | int posted) |
221 | { | 221 | { |
222 | char name[10]; /* 10 = sizeof("gptXX_Xck0") */ | 222 | char name[10]; /* 10 = sizeof("gptXX_Xck0") */ |
223 | const char *oh_name; | 223 | const char *oh_name = NULL; |
224 | struct device_node *np; | 224 | struct device_node *np; |
225 | struct omap_hwmod *oh; | 225 | struct omap_hwmod *oh; |
226 | struct resource irq, mem; | 226 | struct resource irq, mem; |