diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-03-22 23:34:00 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-23 00:44:10 (GMT) |
commit | 6f7d485e13c6c07348cf9cfd1b735fe1bcf3caa9 (patch) | |
tree | e29567aa27363fc8072a355d89d951ef95c41920 /drivers/misc/atmel_tclib.c | |
parent | 4e6735992392ecd393674119aef9ec7bff9be5b0 (diff) | |
download | linux-fsl-qoriq-6f7d485e13c6c07348cf9cfd1b735fe1bcf3caa9.tar.xz |
drivers/misc/hmc6352.c: fix wrong return value checking for i2c_master_recv()
i2c_master_recv() returns negative errno, or else the number of bytes
read. Thus i2c_master_recv(client, i2c_data, 2) returns 2 instead of 1 in
success case.
[akpm@linux-foundation.org: make `ret' signed]
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Kalhan Trisal <kalhan.trisal@intel.com>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc/atmel_tclib.c')
0 files changed, 0 insertions, 0 deletions