Commit 4bc43652 authored by Adrian Bunk's avatar Adrian Bunk Committed by Mauro Carvalho Chehab

V4L/DVB (5933): Dvb-usb/af9005-fe.c: error check fixes

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: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Acked-by: default avatarLuca Olivetti <luca@ventoso.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 639ffd2d
...@@ -343,8 +343,8 @@ static int af9005_reset_pre_viterbi(struct dvb_frontend *fe) ...@@ -343,8 +343,8 @@ static int af9005_reset_pre_viterbi(struct dvb_frontend *fe)
1 & 0xff); 1 & 0xff);
if (ret) if (ret)
return ret; return ret;
af9005_write_ofdm_register(state->d, xd_p_fec_super_frm_unit_15_8, ret = af9005_write_ofdm_register(state->d, xd_p_fec_super_frm_unit_15_8,
1 >> 8); 1 >> 8);
if (ret) if (ret)
return ret; return ret;
/* reset pre viterbi error count */ /* reset pre viterbi error count */
...@@ -879,10 +879,8 @@ static int af9005_fe_init(struct dvb_frontend *fe) ...@@ -879,10 +879,8 @@ static int af9005_fe_init(struct dvb_frontend *fe)
af9005_write_register_bits(state->d, xd_I2C_reg_ofdm_rst, af9005_write_register_bits(state->d, xd_I2C_reg_ofdm_rst,
reg_ofdm_rst_pos, reg_ofdm_rst_len, 1))) reg_ofdm_rst_pos, reg_ofdm_rst_len, 1)))
return ret; return ret;
if ((ret = ret = af9005_write_register_bits(state->d, xd_I2C_reg_ofdm_rst,
af9005_write_register_bits(state->d, xd_I2C_reg_ofdm_rst, reg_ofdm_rst_pos, reg_ofdm_rst_len, 0);
reg_ofdm_rst_pos, reg_ofdm_rst_len, 0)))
return ret;
if (ret) if (ret)
return ret; return ret;
......
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