Skip to content

Commit

Permalink
[media] fc0011: fp/fa value overflow fix
Browse files Browse the repository at this point in the history
Assign the maximum instead of masking with the maximum on value overflow.

Signed-off-by: Michael Buesch <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
mbuesch authored and Mauro Carvalho Chehab committed Feb 8, 2013
1 parent 82f0efb commit 0917a60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/tuners/fc0011.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0917a60

Please sign in to comment.