Skip to content

Commit

Permalink
V4L/DVB (5933): Dvb-usb/af9005-fe.c: error check fixes
Browse files Browse the repository at this point in the history
This patch:
- adds a missing error check and
- removes an error check that could never be true

Both spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Luca Olivetti <luca@ventoso.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Adrian Bunk authored and Mauro Carvalho Chehab committed Jul 30, 2007
1 parent 639ffd2 commit 4bc4365
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions drivers/media/dvb/dvb-usb/af9005-fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,8 @@ static int af9005_reset_pre_viterbi(struct dvb_frontend *fe)
1 & 0xff);
if (ret)
return ret;
af9005_write_ofdm_register(state->d, xd_p_fec_super_frm_unit_15_8,
1 >> 8);
ret = af9005_write_ofdm_register(state->d, xd_p_fec_super_frm_unit_15_8,
1 >> 8);
if (ret)
return ret;
/* reset pre viterbi error count */
Expand Down Expand Up @@ -879,10 +879,8 @@ static int af9005_fe_init(struct dvb_frontend *fe)
af9005_write_register_bits(state->d, xd_I2C_reg_ofdm_rst,
reg_ofdm_rst_pos, reg_ofdm_rst_len, 1)))
return ret;
if ((ret =
af9005_write_register_bits(state->d, xd_I2C_reg_ofdm_rst,
reg_ofdm_rst_pos, reg_ofdm_rst_len, 0)))
return ret;
ret = af9005_write_register_bits(state->d, xd_I2C_reg_ofdm_rst,
reg_ofdm_rst_pos, reg_ofdm_rst_len, 0);

if (ret)
return ret;
Expand Down

0 comments on commit 4bc4365

Please sign in to comment.