omap: pm: Fix error condition in _pwrdm_deps_lookup when pwrdm not found.
Subsystems (3)
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.
Reported-by Paul Walmsley <[email protected]>
Signed-off-by Mike Chan <[email protected]>
--- arch/arm/mach-omap2/powerdomain.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/powerdomain.c +1 -1
@@ -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
Quoted 5 lines · Mike Chan
Check
pwrdm_nameinstead of the address of a null struct when at the end ofpwrdm_deparray.Reported-by Paul Walmsley <[email protected]>Signed-off-by Mike Chan <[email protected]>
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@@ -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
Paul Walmsley
Acked-byQuoted 10 lines · Kevin Hilman
Quoted 5 lines · Mike Chan
Check
pwrdm_nameinstead of the address of a null struct when at the end ofpwrdm_deparray.Reported-by Paul Walmsley <[email protected]>Signed-off-by Mike Chan <[email protected]>Thanks, to keep it all together, I'll revert the original and merge this into a single patch.
Great, then:
Acked-by Paul Walmsley <[email protected]>
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@@ -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