diff options
author | Nicolas Iooss <nicolas.iooss_linux@m4x.org> | 2016-09-10 13:59:49 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-10-24 17:19:28 -0200 |
commit | 7ec03e60ef81c19b5d3a46dd070ee966774b860f (patch) | |
tree | 4ffb02c7b7b352d5e20244f058a756c2bfbb2712 /drivers/media/rc/ite-cir.c | |
parent | 19157003abe4d9ca4706fca8ff8306946f7942c6 (diff) | |
download | op-kernel-dev-7ec03e60ef81c19b5d3a46dd070ee966774b860f.zip op-kernel-dev-7ec03e60ef81c19b5d3a46dd070ee966774b860f.tar.gz |
[media] ite-cir: initialize use_demodulator before using it
Function ite_set_carrier_params() uses variable use_demodulator after
having initialized it to false in some if branches, but this variable is
never set to true otherwise.
This bug has been found using clang -Wsometimes-uninitialized warning
flag.
Fixes: 620a32bba4a2 ("[media] rc: New rc-based ite-cir driver for
several ITE CIRs")
Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/rc/ite-cir.c')
-rw-r--r-- | drivers/media/rc/ite-cir.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c index c5e8e38..367b28b 100644 --- a/drivers/media/rc/ite-cir.c +++ b/drivers/media/rc/ite-cir.c @@ -261,6 +261,8 @@ static void ite_set_carrier_params(struct ite_dev *dev) if (allowance > ITE_RXDCR_MAX) allowance = ITE_RXDCR_MAX; + + use_demodulator = true; } } |