mirror of
https://github.com/rtlsdrblog/rtl-sdr-blog.git
synced 2024-12-25 10:28:28 +01:00
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:
parent
22b9d82fb5
commit
5f88049c0c
@ -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, ®, 1);
|
||||
rtlsdr_read_array(dev, IICB, addr, &data, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user