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:
committed by
Paul Mundt
parent
03c5ecd13c
commit
f5ca6d4cbd
@@ -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))
|
||||||
|
Reference in New Issue
Block a user