[PATCH] rf: dereference pointer

Alexander Huemer alexander.huemer at xx.vu
Sun Nov 20 21:43:25 CET 2011


---
 src/target/firmware/rf/mt6139.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/target/firmware/rf/mt6139.c b/src/target/firmware/rf/mt6139.c
index a9a6d32..d48e652 100644
--- a/src/target/firmware/rf/mt6139.c
+++ b/src/target/firmware/rf/mt6139.c
@@ -39,13 +39,13 @@ static void mt6139_compute_pll(uint32_t f_vco_100khz,
 	/* To compute Nint, we assume Nfrac is zero */
 	*nint = (fvco_100khz / (10 * 2 * 26)) - (0 / 130);
 
-	if (nint > 127)
+	if (*nint > 127)
 		printf("VCO Frequency %u kHz is out of spec\n", f_vco_100khz);
 
 	/* Compute Nfract using the pre-computed Nint */
 	/* Nfrac = ( (Fvco/2*26) - Nint) * 130 */
 	/* Nfrac = ( (Fvco*130)/(2*26) - (Nint * 130) */
-	*nfrac = (f_vco_100khz*130)/(52*10) - (nint * 130);
+	*nfrac = (f_vco_100khz*130)/(52*10) - (*nint * 130);
 }
 
 /* Set ARFCN.  Takes 2 reg_write, i.e. 8 TPU instructions */
-- 
1.7.8.rc1




More information about the baseband-devel mailing list