[Mesa-dev] [PATCH v2 02/40] gallium/trace: remove useless NULL check from trace_screen_create()

Emil Velikov emil.l.velikov at gmail.com
Fri Nov 20 12:11:11 PST 2015


Currently every target makes sure that the screen is non-null prior to
using the debug (trace including) wrappers. If that no longer holds true
we want to know and fix this ASAP rather than silently bailing out.

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
Acked-by: Rob Clark <robclark at freedesktop.org>
---
 src/gallium/drivers/trace/tr_screen.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/gallium/drivers/trace/tr_screen.c b/src/gallium/drivers/trace/tr_screen.c
index 8b02680..62a51e9 100644
--- a/src/gallium/drivers/trace/tr_screen.c
+++ b/src/gallium/drivers/trace/tr_screen.c
@@ -456,9 +456,6 @@ trace_screen_create(struct pipe_screen *screen)
 {
    struct trace_screen *tr_scr;
 
-   if(!screen)
-      goto error1;
-
    if (!trace_enabled())
       goto error1;
 
-- 
2.6.2



More information about the mesa-dev mailing list