Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5aee41a6 authored by Luis Ortega's avatar Luis Ortega Committed by Dmitry Torokhov
Browse files

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: default avatarLuis Ortega <luiorpe1@upv.es>
Acked-by: default avatarHeiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de> - bq Cervantes (imx6sl)
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent ad697b96
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment