rtlsdr_i2c_rad_reg: fix uninitialized variable

This could lead to a misdetection of the tuner on some
platforms (E4K instead of FC0013 on the raspberry pi).

Thanks to Christoph Gommel for reporting this issue.

Signed-off-by: Steve Markgraf <steve@steve-m.de>
This commit is contained in:
Steve Markgraf 2012-08-10 02:11:40 +02:00
parent 22b9d82fb5
commit 5f88049c0c

View File

@ -316,7 +316,7 @@ int rtlsdr_i2c_write_reg(rtlsdr_dev_t *dev, uint8_t i2c_addr, uint8_t reg, uint8
uint8_t rtlsdr_i2c_read_reg(rtlsdr_dev_t *dev, uint8_t i2c_addr, uint8_t reg)
{
uint16_t addr = i2c_addr;
uint8_t data;
uint8_t data = 0;
rtlsdr_write_array(dev, IICB, addr, &reg, 1);
rtlsdr_read_array(dev, IICB, addr, &data, 1);