[PATCH 2/2] ARM: i.MX clk-pllv1: Do not use a negative value for the unsigned variable
Alexander Shiyan
shc_work at mail.ru
Wed Jun 29 09:56:49 PDT 2016
Signed-off-by: Alexander Shiyan <shc_work at mail.ru>
---
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
More information about the barebox
mailing list