Skip to contentSkip to conversation

omap: pm: Fix error condition in _pwrdm_deps_lookup when pwrdm not found.

PATCH In review Mike Chan 3 participants 3 messages Aug 12, 2009 – Aug 13, 2009

Subsystems (3)
lore
Share & tools
lore

Mike Chan

author
#0 lore raw

PATCH 1/1 omap: pm: Fix error condition in _pwrdm_deps_lookup when pwrdm not found.

Check pwrdm_name instead of the address of a null struct when at the end of pwrdm_dep array.

---
 arch/arm/mach-omap2/powerdomain.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/powerdomain.c +1 -1
index 0334609..02c1ef6 100644
@@ -103,7 +103,7 @@ static struct powerdomain *_pwrdm_deps_lookup(struct powerdomain *pwrdm,
 
 	}
 
-	if (!pd)
+	if (!pd->pwrdm_name)
 		return ERR_PTR(-ENOENT);
 
 	return pd->pwrdm;
Signature · 1 line
1.5.4.5
#1 lore raw
Quoted 5 lines · Mike Chan

Check pwrdm_name instead of the address of a null struct when at the end of pwrdm_dep array.

Thanks, to keep it all together, I'll revert the original and merge this into a single patch.

Kevin

Quoted 19 lines
---
 arch/arm/mach-omap2/powerdomain.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/powerdomain.c +1 -1
index 0334609..02c1ef6 100644
@@ -103,7 +103,7 @@ static struct powerdomain *_pwrdm_deps_lookup(struct powerdomain *pwrdm,
 
 	}
 
-	if (!pd)
+	if (!pd->pwrdm_name)
 		return ERR_PTR(-ENOENT);
 
 	return pd->pwrdm;
Signature · 1 line
1.5.4.5
Acked-by
#2 lore raw
Quoted 10 lines · Kevin Hilman
Quoted 5 lines · Mike Chan

Check pwrdm_name instead of the address of a null struct when at the end of pwrdm_dep array.

Thanks, to keep it all together, I'll revert the original and merge this into a single patch.

Great, then:

Quoted 15 lines

Kevin

Quoted 12 lines
---
 arch/arm/mach-omap2/powerdomain.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/powerdomain.c +0 -0
index 0334609..02c1ef6 100644
@@ -103,7 +103,7 @@ static struct powerdomain *_pwrdm_deps_lookup(struct powerdomain *pwrdm,
 
 	}
 
Quoted 8 lines
Quoted 7 lines
arch/arm/mach-omap2/powerdomain.c +1 -1
-	if (!pd)
+	if (!pd->pwrdm_name)
 		return ERR_PTR(-ENOENT);
 
 	return pd->pwrdm;
Signature · 1 line
1.5.4.5

- Paul