diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2016-09-30 23:42:19 (GMT) |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2016-10-03 23:41:00 (GMT) |
commit | 265d426d7470d53e900379960eef5b4482125089 (patch) | |
tree | b29fc943d424476a178f473889e6c665965da28a /drivers/thermal | |
parent | 979987ded3a5ae1fb60ef751bdf185c502d70590 (diff) | |
download | linux-265d426d7470d53e900379960eef5b4482125089.tar.xz |
Input: elan_i2c - fix return tests of i2c_smbus_read_block_data()
i2c_smbus_read_block_data() returns negative errno else the number of
data bytes in the slave's response.
Checking for error not null means the function always fails if the device
answers properly.
So given that we read 3 bytes and access those, better check that we
actually read those 3 bytes.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/thermal')
0 files changed, 0 insertions, 0 deletions