mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 19:07:52 +00:00
ARM: OMAP2+: Fix potentially uninitialized return value for _setup_reset()
[ Upstream commit7f0d078667
] Commit747834ab83
("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:747834ab83
("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>
This commit is contained in:
parent
9a8e28387c
commit
7ea5302d48
1 changed files with 1 additions and 1 deletions
|
@ -2530,7 +2530,7 @@ static void _setup_iclk_autoidle(struct omap_hwmod *oh)
|
||||||
*/
|
*/
|
||||||
static int _setup_reset(struct omap_hwmod *oh)
|
static int _setup_reset(struct omap_hwmod *oh)
|
||||||
{
|
{
|
||||||
int r;
|
int r = 0;
|
||||||
|
|
||||||
if (oh->_state != _HWMOD_STATE_INITIALIZED)
|
if (oh->_state != _HWMOD_STATE_INITIALIZED)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
Loading…
Reference in a new issue