@@ -314,8 +314,10 @@ static int _add_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh)
if (!oh->_clk)
return -EINVAL;
- return pwrdm_add_sleepdep(oh->_clk->clkdm->pwrdm.ptr,
+ if (oh->_clk->clkdm)
+ return pwrdm_add_sleepdep(oh->_clk->clkdm->pwrdm.ptr,
init_oh->_clk->clkdm->pwrdm.ptr);
+ return 0;
}
/**
@@ -335,8 +337,10 @@ static int _del_initiator_dep(struct omap_hwmod *oh, struct omap_hwmod *init_oh)
if (!oh->_clk)
return -EINVAL;
- return pwrdm_del_sleepdep(oh->_clk->clkdm->pwrdm.ptr,
+ if (oh->_clk->clkdm)
+ return pwrdm_del_sleepdep(oh->_clk->clkdm->pwrdm.ptr,
init_oh->_clk->clkdm->pwrdm.ptr);
+ return 0;
}
/**