From: Thara Gopinath Date: Wed, 31 Mar 2010 10:16:29 +0000 (-0600) Subject: OMAP: HWMOD: Adding clockdomain check X-Git-Tag: v2.6.34-rc6~26^2~28^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d5647c18eac9a313a89a3049a9fff51b20021a44;p=platform%2Fkernel%2Flinux-stable.git 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: Thara Gopinath Signed-off-by: Paul Walmsley --- diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index c664947..e436dcb 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -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; }