]> git.baikalelectronics.ru Git - kernel.git/commit
HID: cp2112: fix incorrect error propagation in cp2112_xfer()
authorJiri Kosina <jkosina@suse.cz>
Tue, 18 Feb 2014 08:43:53 +0000 (09:43 +0100)
committerJiri Kosina <jkosina@suse.cz>
Tue, 18 Feb 2014 08:43:53 +0000 (09:43 +0100)
commit175ad7e73bd78f6428efc0c4a28ba17e3f90cb3e
treebeaf36e342f8619bd4c56f8ab01dade59d0ad567
parent949f63472376b11a89117419a56cc798d75f923f
HID: cp2112: fix incorrect error propagation in cp2112_xfer()

Both cp2112_read_req() and cp2112_write_req() are returning negative
value in cases of error, but cp2112_xfer() is storing the return
value into unsigned size_t-typed 'count'.

Fix this by making 'count' signed type.

Reported-by: fengguang.wu@intel.com
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-cp2112.c