Check return status after each register access routine and avoid
masking return status values.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
*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 */
*strength = tmp * 0xffff / 100;
}
- if (ret)
- goto err;
-
return 0;
err: