i965: Reduce cross-pollination between the DRI driver and compiler
[mesa.git] / src / intel / tools / disasm.c
index 2b51424742d10f178bdb70c95dc9107bf2aa4929..96c6ce290a0b822c408adc007c520ba59569821c 100644 (file)
@@ -23,7 +23,6 @@
 
 #include <stdlib.h>
 
-#include "brw_context.h"
 #include "brw_inst.h"
 #include "brw_eu.h"
 
@@ -101,7 +100,11 @@ gen_disasm_create(int pciid)
    if (gd == NULL)
       return NULL;
 
-   gd->devinfo = *gen_get_device_info(pciid);
+   if (!gen_get_device_info(pciid, &gd->devinfo)) {
+      free(gd);
+      return NULL;
+   }
+
    brw_init_compaction_tables(&gd->devinfo);
 
    return gd;