From: Nicolas Iooss Date: Sat, 10 Sep 2016 16:59:49 +0000 (-0300) Subject: [media] ite-cir: initialize use_demodulator before using it X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7ec03e60ef81c19b5d3a46dd070ee966774b860f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c index c5e8e3885766..367b28bed627 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; } }