aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/powerdomain.c
diff options
context:
space:
mode:
authorNishanth Menon <nm@ti.com>2014-06-06 20:36:41 -0400
committerNishanth Menon <nm@ti.com>2014-09-08 12:22:41 -0400
commit13bbffd4ebca57dfae59a3f13ff98dc417f89b23 (patch)
tree52147524cf4cc69e708c3ee21849f22e4da32f48 /arch/arm/mach-omap2/powerdomain.c
parent9f5dc91b691cf296c49aedf0a671fd659a70f737 (diff)
ARM: OMAP2+: powerdomain: pwrdm_for_each_clkdm iterate only valid clkdms
No need to invoke callback when the clkdm pointer is NULL. Signed-off-by: Nishanth Menon <nm@ti.com> Reviewed-by: Kevin Hilman <khilman@linaro.org> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/powerdomain.c')
-rw-r--r--arch/arm/mach-omap2/powerdomain.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c
index faebd5f076af..f391948c76b9 100644
--- a/arch/arm/mach-omap2/powerdomain.c
+++ b/arch/arm/mach-omap2/powerdomain.c
@@ -546,7 +546,8 @@ int pwrdm_for_each_clkdm(struct powerdomain *pwrdm,
546 return -EINVAL; 546 return -EINVAL;
547 547
548 for (i = 0; i < PWRDM_MAX_CLKDMS && !ret; i++) 548 for (i = 0; i < PWRDM_MAX_CLKDMS && !ret; i++)
549 ret = (*fn)(pwrdm, pwrdm->pwrdm_clkdms[i]); 549 if (pwrdm->pwrdm_clkdms[i])
550 ret = (*fn)(pwrdm, pwrdm->pwrdm_clkdms[i]);
550 551
551 return ret; 552 return ret;
552} 553}