提交 f5ca6d4c 编写于 作者: G Guennadi Liakhovetski 提交者: Paul Mundt

sh: simplify WARN usage in SH clock driver

Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 03c5ecd1
...@@ -160,12 +160,9 @@ void propagate_rate(struct clk *tclk) ...@@ -160,12 +160,9 @@ void propagate_rate(struct clk *tclk)
static void __clk_disable(struct clk *clk) static void __clk_disable(struct clk *clk)
{ {
if (clk->usecount == 0) { if (WARN(!clk->usecount, "Trying to disable clock %s with 0 usecount\n",
printk(KERN_ERR "Trying disable clock %s with 0 usecount\n", clk->name))
clk->name);
WARN_ON(1);
return; return;
}
if (!(--clk->usecount)) { if (!(--clk->usecount)) {
if (likely(clk->ops && clk->ops->disable)) if (likely(clk->ops && clk->ops->disable))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册