diff mbox

[1/4] fc0011: fp/fa value overflow fix

Message ID 20130207171313.272e9078@milhouse (mailing list archive)
State New, archived
Headers show

Commit Message

Michael Büsch Feb. 7, 2013, 4:13 p.m. UTC
Assign the maximum instead of masking with the maximum on value overflow.

Signed-off-by: Michael Buesch <m@bues.ch>

---
diff mbox

Patch

Index: linux/drivers/media/tuners/fc0011.c
===================================================================
--- linux.orig/drivers/media/tuners/fc0011.c	2012-10-22 16:11:27.634183359 +0200
+++ linux/drivers/media/tuners/fc0011.c	2012-10-22 16:13:29.140465225 +0200
@@ -247,8 +247,8 @@ 
 		fa += 8;
 	}
 	if (fp > 0x1F) {
-		fp &= 0x1F;
-		fa &= 0xF;
+		fp = 0x1F;
+		fa = 0xF;
 	}
 	if (fa >= fp) {
 		dev_warn(&priv->i2c->dev,