Mesa (master): anv: don't double-close the same fd

Emil Velikov evelikov at kemper.freedesktop.org
Mon Nov 28 20:15:39 UTC 2016


Module: Mesa
Branch: master
Commit: 3af81715470f8d656fe8b8e35475ed2b5fc766da
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3af81715470f8d656fe8b8e35475ed2b5fc766da

Author: Emil Velikov <emil.velikov at collabora.com>
Date:   Thu Nov 24 20:30:42 2016 +0000

anv: don't double-close the same fd

Cc: "13.0" <mesa-stable at lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>

---

 src/intel/vulkan/anv_device.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 3050c38..a410376 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -197,8 +197,6 @@ anv_physical_device_init(struct anv_physical_device *device,
          device->info.max_cs_threads = max_cs_threads;
    }
 
-   close(fd);
-
    brw_process_intel_debug_variable();
 
    device->compiler = brw_compiler_create(NULL, &device->info);
@@ -215,6 +213,7 @@ anv_physical_device_init(struct anv_physical_device *device,
 
    isl_device_init(&device->isl_dev, &device->info, swizzled);
 
+   close(fd);
    return VK_SUCCESS;
 
 fail:




More information about the mesa-commit mailing list