[PATCH 2/2] ARM: i.MX clk-pllv1: Do not use a negative value for the unsigned variable

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

 



Signed-off-by: Alexander Shiyan <shc_work@xxxxxxx>
---
 arch/arm/mach-imx/clk-pllv1.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-imx/clk-pllv1.c b/arch/arm/mach-imx/clk-pllv1.c
index 6785da0..f992134 100644
--- a/arch/arm/mach-imx/clk-pllv1.c
+++ b/arch/arm/mach-imx/clk-pllv1.c
@@ -61,8 +61,9 @@ static unsigned long clk_pllv1_recalc_rate(struct clk *clk,
 
 	do_div(ll, mfd + 1);
 	if (mfn < 0)
-		ll = -ll;
-	ll = (freq * mfi) + ll;
+		ll = (freq * mfi) - ll;
+	else
+		ll = (freq * mfi) + ll;
 
 	return ll;
 }
-- 
2.4.9


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux