diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-15 01:14:17 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 17:56:03 -0300 |
commit | 320ed23ebf135a3403a7068ede7ca7915675bd47 (patch) | |
tree | ce029de18fb37e15d54504601a0c6b4cd379ce52 /drivers/media | |
parent | c4c3a3d32a2eac18dba04683bb5b7357402405c7 (diff) | |
download | linux-320ed23ebf135a3403a7068ede7ca7915675bd47.tar.gz linux-320ed23ebf135a3403a7068ede7ca7915675bd47.tar.bz2 linux-320ed23ebf135a3403a7068ede7ca7915675bd47.zip |
[media] drxk: Fix a bug at some switches that broke DVB-T
The error propagation changeset c23bf4402 broke the DVB-T
code.
The legacy way for propagate errors was:
do {
status = foo_func()
if (status < 0)
break;
} while (0);
return status;
However, on a few places, it was doing:
do {
switch(foo) {
case bar:
status = foo_func()
if (status < 0)
break;
break;
}
switch(foo2) {
case bar:
status = foo_func()
if (status < 0)
break;
break;
}
...
} while (0);
return (status)
The inner error break were not working, as it were breaking only
the switch, instead of the do. The solution used were to do a
s/break/goto error/ at the inner breaks, but preserving the last
break. Onfortunately, on a few switches, the replacement were
applied also to the final break for the case statements.
Fix the broken logic, by reverting them to break, where pertinent,
in order to fix DVB-T support.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/frontends/drxk_hard.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends/drxk_hard.c index a0e2ff51263e..217796dd49bf 100644 --- a/drivers/media/dvb/frontends/drxk_hard.c +++ b/drivers/media/dvb/frontends/drxk_hard.c @@ -3451,13 +3451,13 @@ static int DVBTCtrlSetEchoThreshold(struct drxk_state *state, data |= ((echoThres->threshold << OFDM_SC_RA_RAM_ECHO_THRES_2K__B) & (OFDM_SC_RA_RAM_ECHO_THRES_2K__M)); - goto error; + break; case DRX_FFTMODE_8K: data &= ~OFDM_SC_RA_RAM_ECHO_THRES_8K__M; data |= ((echoThres->threshold << OFDM_SC_RA_RAM_ECHO_THRES_8K__B) & (OFDM_SC_RA_RAM_ECHO_THRES_8K__M)); - goto error; + break; default: return -EINVAL; goto error; @@ -3825,10 +3825,10 @@ static int SetDVBT(struct drxk_state *state, u16 IntermediateFreqkHz, /* fall through , try first guess DRX_FFTMODE_8K */ case TRANSMISSION_MODE_8K: transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_MODE_8K; - goto error; + break; case TRANSMISSION_MODE_2K: transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_MODE_2K; - goto error; + break; } /* guard */ @@ -3839,16 +3839,16 @@ static int SetDVBT(struct drxk_state *state, u16 IntermediateFreqkHz, /* fall through , try first guess DRX_GUARD_1DIV4 */ case GUARD_INTERVAL_1_4: transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_GUARD_4; - goto error; + break; case GUARD_INTERVAL_1_32: transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_GUARD_32; - goto error; + break; case GUARD_INTERVAL_1_16: transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_GUARD_16; - goto error; + break; case GUARD_INTERVAL_1_8: transmissionParams |= OFDM_SC_RA_RAM_OP_PARAM_GUARD_8; - goto error; + break; } /* hierarchy */ |