media: dvb_frontend: ensure that inital front end status initialized
authorColin Ian King <colin.king@canonical.com>
Thu, 20 Jul 2017 22:12:07 +0000 (18:12 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sun, 27 Aug 2017 21:55:51 +0000 (17:55 -0400)
commita9e4998073d49a762a154a6b48a332ec6cb8e6b1
tree8de9cd87e2221b9cad48a752d7ee2855903dadbd
parentf3ee363fc16c56ec3d56e03948dc1f57f692c3f6
media: dvb_frontend: ensure that inital front end status initialized

The fe_status variable s is not initialized meaning it can have any
random garbage status.  This could be problematic if fe->ops.tune is
false as s is not updated by the call to fe->ops.tune() and a
subsequent check on the change status will using a garbage value.
Fix this by adding FE_NONE to the enum fe_status and initializing
s to this.

Detected by CoverityScan, CID#112887 ("Uninitialized scalar variable")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/dvb-core/dvb_frontend.c
include/uapi/linux/dvb/frontend.h