Merge branch 'for-airlied' of git://git.freedesktop.org/git/nouveau/linux-2.6 into...
[sfrench/cifs-2.6.git] / arch / arm / mach-omap2 / clockdomain.c
index 1a45ed1e8ba1096e33e8b3dd5a3d1432a3547149..dd285f00146715177d1a51593f3097fd7218c901 100644 (file)
@@ -559,7 +559,7 @@ int omap2_clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk)
         * downstream clocks for debugging purposes?
         */
 
-       if (!clkdm || !clk)
+       if (!clkdm || !clk || !clkdm->clktrctrl_mask)
                return -EINVAL;
 
        if (atomic_inc_return(&clkdm->usecount) > 1)
@@ -610,7 +610,7 @@ int omap2_clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk)
         * downstream clocks for debugging purposes?
         */
 
-       if (!clkdm || !clk)
+       if (!clkdm || !clk || !clkdm->clktrctrl_mask)
                return -EINVAL;
 
 #ifdef DEBUG