diff options
author | Luis Ortega <luiorpe1@upv.es> | 2014-01-27 12:27:49 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-01-27 22:35:17 -0800 |
commit | 5aee41a60c4d53f65918c1ec0ab94c245f2c08af (patch) | |
tree | 621414d35c644bbed2d75a02f490dda9d55f0b4d /drivers/input/touchscreen/ad7877.c | |
parent | ad697b96e67dc34ef69e3358c331c69dcd283c0d (diff) | |
download | talos-obmc-linux-5aee41a60c4d53f65918c1ec0ab94c245f2c08af.tar.gz talos-obmc-linux-5aee41a60c4d53f65918c1ec0ab94c245f2c08af.zip |
Input: zforce - remove unnecessary payload data checks
The function zforce_read_packet() reads 2 values (bytes) of payload
header, validates them and then proceeds to read the payload body.
The function stores all these in a u8 buffer.
The PAYLOAD_LENGTH check seems to be trying to detect an overflow error.
However, since we are just reading a u8 value from the buffer, these
checks are unnecessary and we should simply compare against zero.
Signed-off-by: Luis Ortega <luiorpe1@upv.es>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de> - bq Cervantes (imx6sl)
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen/ad7877.c')
0 files changed, 0 insertions, 0 deletions