sh: simplify WARN usage in SH clock driver

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
Guennadi Liakhovetski 2010-05-04 14:15:09 +00:00 committed by Paul Mundt
parent 03c5ecd13c
commit f5ca6d4cbd
1 changed files with 2 additions and 5 deletions

View File

@ -160,12 +160,9 @@ void propagate_rate(struct clk *tclk)
static void __clk_disable(struct clk *clk)
{
if (clk->usecount == 0) {
printk(KERN_ERR "Trying disable clock %s with 0 usecount\n",
clk->name);
WARN_ON(1);
if (WARN(!clk->usecount, "Trying to disable clock %s with 0 usecount\n",
clk->name))
return;
}
if (!(--clk->usecount)) {
if (likely(clk->ops && clk->ops->disable))