i2cdump: bail-out if block read fails
authorBartosz Golaszewski <bartekgola@gmail.com>
Tue, 27 Oct 2015 16:15:04 +0000 (17:15 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 1 Nov 2015 19:55:09 +0000 (20:55 +0100)
commit74bb9d5e63b0928ceac57fedd4a2d383129ade7d
treedf843f9e83ff4986287cc9e885ab59b1506296f7
parent1fe75b8ef10933d047f7ab6060d4710a39611e92
i2cdump: bail-out if block read fails

We should bail-out if i2c_smbus_read_block_data() or
i2c_smbus_read_i2c_block_data() return 0 or less. Add the missing check
for the former and fix the existing for the latter.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
miscutils/i2c_tools.c