From: Guennadi Liakhovetski Date: Tue, 4 May 2010 14:15:09 +0000 (+0000) Subject: sh: simplify WARN usage in SH clock driver X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f5ca6d4cbd49dbb6e179a71fa610eb321a3e9951;p=linux-beck.git sh: simplify WARN usage in SH clock driver Signed-off-by: Guennadi Liakhovetski Signed-off-by: Paul Mundt --- diff --git a/drivers/sh/clk.c b/drivers/sh/clk.c index c90a3e1e1085..5d84adac9ec4 100644 --- a/drivers/sh/clk.c +++ b/drivers/sh/clk.c @@ -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))