[PATCH 08/13] drm/ast: Remove dead code from cbr_scan2

Daniel Vetter daniel.vetter at ffwll.ch
Sat Apr 5 02:44:57 PDT 2014


The outer if already checks for data != 0, so it can't really be
0. Hence remove it.

Now I don't have specs or anything for this beast, so I have no
idea whether this was actually intended or whether the logic
should be different. At least the code still seems to be doing
something useful.

Spotted by coverity.

Cc: Dave Airlie <airlied at redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 drivers/gpu/drm/ast/ast_post.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/ast/ast_post.c b/drivers/gpu/drm/ast/ast_post.c
index 977cfb35837a..6263116054b6 100644
--- a/drivers/gpu/drm/ast/ast_post.c
+++ b/drivers/gpu/drm/ast/ast_post.c
@@ -572,8 +572,6 @@ static u32 cbr_scan2(struct ast_private *ast)
 		for (loop = 0; loop < CBR_PASSNUM2; loop++) {
 			if ((data = cbr_test2(ast)) != 0) {
 				data2 &= data;
-				if (!data)
-					return 0;
 				break;
 			}
 		}
-- 
1.8.5.2



More information about the dri-devel mailing list