From: Colin Ian King Date: Thu, 29 Dec 2016 18:13:43 +0000 (-0800) Subject: Input: synaptics-rmi4 - remove redundant null check on rmi_dev X-Git-Tag: v4.11-rc1~102^2^2~13^2~5 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=3a11c0e1f1394e9d871dd8e68f9ce01d7c96e28d;p=linux.git Input: synaptics-rmi4 - remove redundant null check on rmi_dev 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 Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/rmi4/rmi_f03.c b/drivers/input/rmi4/rmi_f03.c index 8a7ca3e2f95e..9a1b099b72e0 100644 --- a/drivers/input/rmi4/rmi_f03.c +++ b/drivers/input/rmi4/rmi_f03.c @@ -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) {