Commit 13122f98 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] dib8000: fix a warning

drivers/media/dvb-frontends/dib8000.c: In function 'dib8000_wait_lock':
drivers/media/dvb-frontends/dib8000.c:3972:1: warning: 'value' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/media/dvb-frontends/dib8000.c:2419:6: note: 'value' was declared here
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 746f7ae0
...@@ -2416,19 +2416,19 @@ static void dib8000_set_isdbt_common_channel(struct dib8000_state *state, u8 seq ...@@ -2416,19 +2416,19 @@ static void dib8000_set_isdbt_common_channel(struct dib8000_state *state, u8 seq
static u32 dib8000_wait_lock(struct dib8000_state *state, u32 internal, static u32 dib8000_wait_lock(struct dib8000_state *state, u32 internal,
u32 wait0_ms, u32 wait1_ms, u32 wait2_ms) u32 wait0_ms, u32 wait1_ms, u32 wait2_ms)
{ {
u32 value; u32 value = 0; /* P_search_end0 wait time */
u16 reg = 11; /* P_search_end0 start addr */ u16 reg = 11; /* P_search_end0 start addr */
for (reg = 11; reg < 16; reg += 2) { for (reg = 11; reg < 16; reg += 2) {
if (reg == 11) { if (reg == 11) {
if (state->revision == 0x8090) if (state->revision == 0x8090)
value = internal * wait1_ms; /* P_search_end0 wait time */ value = internal * wait1_ms;
else else
value = internal * wait0_ms; /* P_search_end0 wait time */ value = internal * wait0_ms;
} else if (reg == 13) } else if (reg == 13)
value = internal * wait1_ms; /* P_search_end0 wait time */ value = internal * wait1_ms;
else if (reg == 15) else if (reg == 15)
value = internal * wait2_ms; /* P_search_end0 wait time */ value = internal * wait2_ms;
dib8000_write_word(state, reg, (u16)((value >> 16) & 0xffff)); dib8000_write_word(state, reg, (u16)((value >> 16) & 0xffff));
dib8000_write_word(state, (reg + 1), (u16)(value & 0xffff)); dib8000_write_word(state, (reg + 1), (u16)(value & 0xffff));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment