linux/arch/arm/mach-omap2
Tony Lindgren 73100213d8 ARM: OMAP2+: Fix potentially uninitialized return value for _setup_reset()
[ Upstream commit 7f0d078667a494466991aa7133f49594f32ff6a2 ]

Commit 747834ab8347 ("ARM: OMAP2+: hwmod: revise hardreset behavior") made
the call to _enable() conditional based on no oh->rst_lines_cnt. This
caused the return value to be potentially uninitialized. Curiously we see
no compiler warnings for this, probably as this gets inlined.

We call _setup_reset() from _setup() and only _setup_postsetup() if the
return value is zero. Currently the return value can be uninitialized for
cases where oh->rst_lines_cnt is set and HWMOD_INIT_NO_RESET is not set.

Fixes: 747834ab8347 ("ARM: OMAP2+: hwmod: revise hardreset behavior")
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-29 10:24:20 +01:00
..
2013-06-12 08:00:35 -07:00
2014-01-17 12:35:48 -08:00
2016-06-10 04:14:37 -07:00
2017-01-15 13:42:57 +01:00
2019-12-21 10:41:13 +01:00
2017-01-15 13:42:57 +01:00
2015-07-16 00:06:05 -07:00
2017-01-15 13:42:57 +01:00
2016-06-10 04:15:33 -07:00
2015-07-20 10:52:36 -07:00
2016-06-10 04:17:07 -07:00
2016-02-06 23:13:30 -08:00
2016-05-18 12:35:46 -07:00