Skip to content

Commit

Permalink
[media] m88rs2000: initialize status to zero
Browse files Browse the repository at this point in the history
status is not initialized so it can contain garbage. The
check for status containing the FE_HAS_LOCK bit may randomly pass
or fail if the read of register 0x8c fails to set status after 25
read attempts.  Fix this by initializing status to 0.

Issue found with CoverityScan, CID#986738

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  • Loading branch information
Colin Ian King authored and Mauro Carvalho Chehab committed Jun 10, 2016
1 parent e44c153 commit cac1c63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/dvb-frontends/m88rs2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ static int m88rs2000_set_frontend(struct dvb_frontend *fe)
{
struct m88rs2000_state *state = fe->demodulator_priv;
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
enum fe_status status;
enum fe_status status = 0;
int i, ret = 0;
u32 tuner_freq;
s16 offset = 0;
Expand Down

0 comments on commit cac1c63

Please sign in to comment.