]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] fc0011: fp/fa value overflow fix
authorMichael Büsch <m@bues.ch>
Thu, 7 Feb 2013 15:13:13 +0000 (12:13 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 8 Feb 2013 19:39:37 +0000 (17:39 -0200)
Assign the maximum instead of masking with the maximum on value overflow.

Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/tuners/fc0011.c

index e4882546c2839cedaf484e4d05709f3115d79725..3089f2ebcbfee1d84fd39dc26fbaae5acc363ef2 100644 (file)
@@ -247,8 +247,8 @@ static int fc0011_set_params(struct dvb_frontend *fe)
                fa += 8;
        }
        if (fp > 0x1F) {
-               fp &= 0x1F;
-               fa &= 0xF;
+               fp = 0x1F;
+               fa = 0xF;
        }
        if (fa >= fp) {
                dev_warn(&priv->i2c->dev,