Skip to content

Commit

Permalink
sh: simplify WARN usage in SH clock driver
Browse files Browse the repository at this point in the history
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Guennadi Liakhovetski authored and Paul Mundt committed May 13, 2010
1 parent 03c5ecd commit f5ca6d4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/sh/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit f5ca6d4

Please sign in to comment.