Skip to contentSkip to conversation

ARM: OMAP2+: hwmod: fix missing braces in _init()

PATCH New Rajendra Nayak 2 participants 2 messages Mar 14, 2014 – Apr 11, 2014

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: OMAP2+: hwmod: fix missing braces in _init()

From: Suman Anna <[email protected]>

Bug was introduced by commit 'f92d959: ARM: OMAP2+: hwmod:
Extract no-idle and no-reset info from DT'

There were 2 versions of the patch posted which resulted in the above commit. While v1 [1] had the bug, v2 [2] had it fixed. However v1 apparently seemed to have been pulled in by mistake introducing the bug.

Given of_find_property() does return NULL when the node passed is NULL, it did not introduce any functional issues as such, just the fact that the second if check was executed unnecessarily.

[1] https://www.mail-archive.com/linux-omap at vger.kernel.org/msg94220.html
[2] http://www.spinics.net/lists/linux-omap/msg98490.html

---
 arch/arm/mach-omap2/omap_hwmod.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-omap2/omap_hwmod.c +2 -1
index 1f33f5d..66c60fe 100644
@@ -2546,11 +2546,12 @@ static int __init _init(struct omap_hwmod *oh, void *data)
 		return -EINVAL;
 	}
 
-	if (np)
+	if (np) {
 		if (of_find_property(np, "ti,no-reset-on-init", NULL))
 			oh->flags |= HWMOD_INIT_NO_RESET;
 		if (of_find_property(np, "ti,no-idle-on-init", NULL))
 			oh->flags |= HWMOD_INIT_NO_IDLE;
+	}
 
 	oh->_state = _HWMOD_STATE_INITIALIZED;
 
Signature · 1 line
1.7.9.5
maintainer
#1 lore raw

PATCH 1/1 ARM: OMAP2+: hwmod: fix missing braces in _init()

Quoted 14 lines · Rajendra Nayak

From: Suman Anna <[email protected]>

Bug was introduced by commit 'f92d959: ARM: OMAP2+: hwmod:
Extract no-idle and no-reset info from DT'

There were 2 versions of the patch posted which resulted in the above commit. While v1 [1] had the bug, v2 [2] had it fixed. However v1 apparently seemed to have been pulled in by mistake introducing the bug.

Given of_find_property() does return NULL when the node passed is NULL, it did not introduce any functional issues as such, just the fact that the second if check was executed unnecessarily.

Quoted 7 lines

[1] https://www.mail-archive.com/linux-omap at vger.kernel.org/msg94220.html
[2] http://www.spinics.net/lists/linux-omap/msg98490.html

Thanks, queued for v3.15-rc.

- Paul