diff options
author | Nishanth Menon <nm@ti.com> | 2014-06-07 04:36:41 +0400 |
---|---|---|
committer | Nishanth Menon <nm@ti.com> | 2014-09-08 20:22:41 +0400 |
commit | 13bbffd4ebca57dfae59a3f13ff98dc417f89b23 (patch) | |
tree | 52147524cf4cc69e708c3ee21849f22e4da32f48 /arch/arm | |
parent | 9f5dc91b691cf296c49aedf0a671fd659a70f737 (diff) | |
download | linux-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.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, 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; } |