提交 13bbffd4 编写于 作者: N Nishanth Menon

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: NNishanth Menon <nm@ti.com>
Reviewed-by: NKevin Hilman <khilman@linaro.org>
Acked-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
上级 9f5dc91b
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册