aboutsummaryrefslogtreecommitdiffstats
path: root/src/rtl_fm.c
diff options
context:
space:
mode:
authorDerrick Pallas <derrick@pallas.us>2020-03-18 14:54:48 -0700
committerSteve Markgraf <steve@steve-m.de>2020-03-18 23:51:46 +0100
commitd794155ba65796a76cd0a436f9709f4601509320 (patch)
tree701de60b75d3f4507c9b393b1f8bdb2196c2e112 /src/rtl_fm.c
parentdc92af01bf82b5185986190e3cde3762565d2194 (diff)
tuner_r82xx: fix short-write in r82xx_read
In r82xx_read, there is a 1-byte I2C write followed by the I2C read. If this I2C write fails, r82xx_read correctly bails out but may return 0. Callers that check whether (rc < 0) will assume that the buffer was written when it has not been, e.g. in r82xx_set_tv_standard where priv->fil_cal_code = data[4] & 0x0f; consumes a garbage value for data[4]. This change resolves that issue by copying the error path from r82xx_write.
Diffstat (limited to 'src/rtl_fm.c')
0 files changed, 0 insertions, 0 deletions