Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5ca6d4c authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Paul Mundt
Browse files

sh: simplify WARN usage in SH clock driver

parent 03c5ecd1
Loading
Loading
Loading
Loading
+2 −5
Original line number Original line Diff line number Diff line
@@ -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))