Re: [PATCH] CLK: TI: DRA7: return error code in failure case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/19/2014 02:25 PM, Julia Lawall wrote:
From: Julia Lawall <Julia.Lawall@xxxxxxx>

Add a returned error code in the MAX_APLL_WAIT_TRIES case.  Remove the
updating of the return variable r to 0 if MAX_APLL_WAIT_TRIES is not yet
reached, because r is already 0 at this point.

Signed-off-by: Julia Lawall <Julia.Lawall@xxxxxxx>

Acked-by: Tero Kristo <t-kristo@xxxxxx>

Mike, do you want to queue this as a fix or shall I add this to be queued for 3.16?

-Tero


---
diff --git a/drivers/clk/ti/apll.c b/drivers/clk/ti/apll.c
index b986f61..efc71a0 100644
--- a/drivers/clk/ti/apll.c
+++ b/drivers/clk/ti/apll.c
@@ -77,13 +77,11 @@ static int dra7_apll_enable(struct clk_hw *hw)
  	if (i == MAX_APLL_WAIT_TRIES) {
  		pr_warn("clock: %s failed transition to '%s'\n",
  			clk_name, (state) ? "locked" : "bypassed");
-	} else {
+		r = -EBUSY;
+	} else
  		pr_debug("clock: %s transition to '%s' in %d loops\n",
  			 clk_name, (state) ? "locked" : "bypassed", i);

-		r = 0;
-	}
-
  	return r;
  }


--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux