MLK-20207-2: input: synaptics_dsx_i2c: fix coverity Unsigned compared against 0 issue.
authorHaibo Chen <haibo.chen@nxp.com>
Mon, 19 Nov 2018 09:34:44 +0000 (17:34 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
CID 3869705: Unsigned compared against 0 (NO_EFFECT)
unsigned_compare: This greater-than-or-equal-to-zero comparison of an
unsigned value is always true. attr_count >= 0.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
(cherry picked from commit 7380600ba0d0763b6081c07f5ddcb018a54314ca)
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
drivers/input/touchscreen/synaptics_dsx/synaptics_dsx_i2c.c

index 64089d3..7194122 100644 (file)
@@ -3162,7 +3162,7 @@ static int synaptics_rmi4_probe(struct i2c_client *client,
                const struct i2c_device_id *dev_id)
 {
        int retval, ret;
-       unsigned char attr_count;
+       signed char attr_count;
        struct synaptics_rmi4_data *rmi4_data;
        struct device_node *np = client->dev.of_node;
 #if 0