Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 4ef2ccc2 authored by Trent Piepho's avatar Trent Piepho Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (10558): bttv: norm value should be unsigned



The norm value in the driver is an index into an array and the the driver
doesn't allow it to be negative or otherwise invalid.  It should be
unsigned but wasn't in all places.

Fix some structs and functions to have the norm be unsigned.  Get rid of
useless checks for "< 0".  Most of the driver code can't handle a norm
value that's out of range, so change some ">= BTTV_TVNORMS" checks to
BUG_ON().  There's no point in silently ignoring invalid driver state just
to crash because of it later.

Reported-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarTrent Piepho <xyzzy@speakeasy.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 1d6af821
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment