提交 1620d221 编写于 作者: A Antti Palosaari 提交者: Mauro Carvalho Chehab

[media] af9033: improve read_signal_strength error handling slightly

Check return status after each register access routine and avoid
masking return status values.
Signed-off-by: NAntti Palosaari <crope@iki.fi>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 0b0d9628
......@@ -876,7 +876,12 @@ static int af9033_read_signal_strength(struct dvb_frontend *fe, u16 *strength)
*strength = u8tmp * 0xffff / 100;
} else {
ret = af9033_rd_reg(dev, 0x8000f7, &u8tmp);
ret |= af9033_rd_regs(dev, 0x80f900, buf, 7);
if (ret < 0)
goto err;
ret = af9033_rd_regs(dev, 0x80f900, buf, 7);
if (ret < 0)
goto err;
if (c->frequency <= 300000000)
gain_offset = 7; /* VHF */
......@@ -901,9 +906,6 @@ static int af9033_read_signal_strength(struct dvb_frontend *fe, u16 *strength)
*strength = tmp * 0xffff / 100;
}
if (ret)
goto err;
return 0;
err:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册