ite-cir: initialize use_demodulator before using it
authorNicolas Iooss <nicolas.iooss_linux@m4x.org>
Sat, 10 Sep 2016 16:59:49 +0000 (13:59 -0300)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 16 Mar 2017 02:18:23 +0000 (02:18 +0000)
commit81e286423efb1e92838ee1a5bf03294e99371a5d
tree9fd9210b3c6bf09b2189312665d5c9dbf92c015d
parent8357db75267554aa83a1bd5324124e3cf38c13d0
ite-cir: initialize use_demodulator before using it

commit 7ec03e60ef81c19b5d3a46dd070ee966774b860f upstream.

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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/media/rc/ite-cir.c