diff options
author | Nishanth Menon <nm@ti.com> | 2014-06-06 20:36:41 -0400 |
---|---|---|
committer | Nishanth Menon <nm@ti.com> | 2014-09-08 12:22:41 -0400 |
commit | 13bbffd4ebca57dfae59a3f13ff98dc417f89b23 (patch) | |
tree | 52147524cf4cc69e708c3ee21849f22e4da32f48 /arch/arm/mach-omap2/powerdomain.c | |
parent | 9f5dc91b691cf296c49aedf0a671fd659a70f737 (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.c | 3 |
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 | } |