[Mesa-dev] [PATCH 2/3] i965/drm: Remove dead return in brw_bo_busy()

Kenneth Graunke kenneth at whitecape.org
Thu Apr 13 06:33:13 UTC 2017


If ret is 0, we return.  If ret is not 0, we return.  This is dead.

CID: 1405013 (Structurally dead code (UNREACHABLE))
---
 src/mesa/drivers/dri/i965/brw_bufmgr.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c b/src/mesa/drivers/dri/i965/brw_bufmgr.c
index fa7bf69a84e..2a7e3320797 100644
--- a/src/mesa/drivers/dri/i965/brw_bufmgr.c
+++ b/src/mesa/drivers/dri/i965/brw_bufmgr.c
@@ -207,10 +207,8 @@ brw_bo_busy(struct brw_bo *bo)
    if (ret == 0) {
       bo->idle = !busy.busy;
       return busy.busy;
-   } else {
-      return false;
    }
-   return (ret == 0 && busy.busy);
+   return false;
 }
 
 int
-- 
2.12.2



More information about the mesa-dev mailing list