summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorNishanth Menon <nm@ti.com>2014-06-07 04:36:41 +0400
committerNishanth Menon <nm@ti.com>2014-09-08 20:22:41 +0400
commit13bbffd4ebca57dfae59a3f13ff98dc417f89b23 (patch)
tree52147524cf4cc69e708c3ee21849f22e4da32f48 /arch/arm
parent9f5dc91b691cf296c49aedf0a671fd659a70f737 (diff)
downloadlinux-13bbffd4ebca57dfae59a3f13ff98dc417f89b23.tar.xz
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')
-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,
return -EINVAL;
for (i = 0; i < PWRDM_MAX_CLKDMS && !ret; i++)
- ret = (*fn)(pwrdm, pwrdm->pwrdm_clkdms[i]);
+ if (pwrdm->pwrdm_clkdms[i])
+ ret = (*fn)(pwrdm, pwrdm->pwrdm_clkdms[i]);
return ret;
}