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

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

 



Assign the maximum instead of masking with the maximum on value overflow.

Signed-off-by: Michael Buesch <m@xxxxxxx>

---

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,


-- 
Greetings, Michael.

PGP: 908D8B0E

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux