lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20161221144104.25794-1-colin.king@canonical.com>
Date:   Wed, 21 Dec 2016 14:41:04 +0000
From:   Colin King <colin.king@...onical.com>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Andrew Duggan <aduggan@...aptics.com>,
        Benjamin Tissoires <benjamin.tissoires@...hat.com>,
        Lyude Paul <thatslyude@...il.com>,
        Dennis Wassenberg <dennis.wassenberg@...unet.com>,
        linux-input@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH] input: synaptics-rmi4: remove redundant null check on rmi_dev

From: Colin Ian King <colin.king@...onical.com>

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. Thanks to Dmitry Torokhov for
noticing that we can remove the null check.

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

Signed-off-by: Colin Ian King <colin.king@...onical.com>
---
 drivers/input/rmi4/rmi_f03.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/input/rmi4/rmi_f03.c b/drivers/input/rmi4/rmi_f03.c
index 8a7ca3e..9a1b099 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) {
-- 
2.10.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ