diff options
author | Hans de Goede <hdegoede@redhat.com> | 2014-03-18 15:16:30 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-03-18 15:55:54 +0000 |
commit | 6446bf96f0cc01e730c240f7ed5c91f5d2292139 (patch) | |
tree | 98e3e7da3afa6ded1383cca16737ae565fa0b4bd | |
parent | 4a6e09c6cdb13773bca5f6831f9f5164008699c9 (diff) |
intel: Don't close the fd on probe failure if it is server managed
I hit this corner case when testing a single X server spanning both intel
gfx + an usb display link adapter driven by xf86-video-modesetting.
In this scenario the intel driver gets its platformProbe method called first,
and if it then closes the server managed fd, the xf86-video-modesetting gets
EBADFD errors.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-rw-r--r-- | src/intel_device.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/intel_device.c b/src/intel_device.c index e95936bd..11118c20 100644 --- a/src/intel_device.c +++ b/src/intel_device.c @@ -339,7 +339,8 @@ int intel_open_device(int entity_num, return fd; err_close: - close(fd); + if (master_count == 0) /* Don't close server-fds */ + close(fd); err_path: free(local_path); return -1; |