提交 d5647c18 编写于 作者: T Thara Gopinath 提交者: Paul Walmsley

OMAP: HWMOD: Adding clockdomain check

This patch adds check for presence of clockdomain structure in the API
omap_hwmod_get_pwrdm before trying to access the powerdomain structure.
This will prevent unnecessary crashing of the system in case of a
clock node with out an associated clockdomain.
Signed-off-by: NThara Gopinath <thara@ti.com>
Signed-off-by: NPaul Walmsley <paul@pwsan.com>
上级 2eaa9cfd
......@@ -1511,6 +1511,9 @@ struct powerdomain *omap_hwmod_get_pwrdm(struct omap_hwmod *oh)
c = oh->slaves[oh->_mpu_port_index]->_clk;
}
if (!c->clkdm)
return NULL;
return c->clkdm->pwrdm.ptr;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册