Input: synaptics-rmi4 - remove redundant null check on rmi_dev
authorColin Ian King <colin.king@canonical.com>
Thu, 29 Dec 2016 18:13:43 +0000 (10:13 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 29 Dec 2016 18:20:19 +0000 (10:20 -0800)
rmi_dev is currently being dereferenced before it null checked, however,
after deeper inspecting, rmi_dev can never be null, so just remove this
redundant check.

Fixes CoverityScan CID 1391218 ("Dereference before null check")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/rmi4/rmi_f03.c

index 8a7ca3e2f95e62448cc2ecfcf910f767b9337bfa..9a1b099b72e0302b472b593164a1d9d175714241 100644 (file)
@@ -175,9 +175,6 @@ static int rmi_f03_attention(struct rmi_function *fn, unsigned long *irq_bits)
        int i;
        int error;
 
-       if (!rmi_dev)
-               return -ENODEV;
-
        if (drvdata->attn_data.data) {
                /* First grab the data passed by the transport device */
                if (drvdata->attn_data.size < ob_len) {