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>] [day] [month] [year] [list]
Date:   Tue, 12 Dec 2017 12:20:37 +0100
From:   Sylwester Nawrocki <s.nawrocki@...sung.com>
To:     a.hajda@...sung.com
Cc:     architt@...eaurora.org, airlied@...ux.ie,
        jeffy.chen@...k-chips.com, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org,
        Sylwester Nawrocki <s.nawrocki@...sung.com>
Subject: [PATCH] drm/bridge: analogix: Remove unreachable code from
 analogic_dp_core.c

This patch removes an unreachable code found by the SVACE static
analysis:

UNREACHABLE_CODE: This statement in the source code might be unreachable during program execution.
[unreachable] unreachable at drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:787
retval != 0 is always false because at this program point the variable retval
is always equal to 0 at drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:786

Signed-off-by: Sylwester Nawrocki <s.nawrocki@...sung.com>
---
 drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index 5dd3f1cd074a..263e8215b3de 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -727,7 +727,6 @@ static int analogix_dp_set_link_train(struct analogix_dp_device *dp,
 
 static int analogix_dp_config_video(struct analogix_dp_device *dp)
 {
-	int retval = 0;
 	int timeout_loop = 0;
 	int done_count = 0;
 
@@ -783,10 +782,7 @@ static int analogix_dp_config_video(struct analogix_dp_device *dp)
 		usleep_range(1000, 1001);
 	}
 
-	if (retval != 0)
-		dev_err(dp->dev, "Video stream is not detected!\n");
-
-	return retval;
+	return 0;
 }
 
 static void analogix_dp_enable_scramble(struct analogix_dp_device *dp,
-- 
2.14.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ