[Mesa-dev] [PATCH] libdrm: Fix drmOpenByName() udev identification method

Jay Cornwall jay at jcornwall.me
Mon Sep 23 17:39:41 PDT 2013


This code incorrectly worked by falling through to /proc/dri method.
Now that /proc/dri is removed, drmOpenByName() fails even when udev
identification succeeds.

Signed-off-by: Jay Cornwall <jay at jcornwall.me>
---
 xf86drm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xf86drm.c b/xf86drm.c
index 4791a05..1b156e5 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -565,9 +565,9 @@ static int drmOpenByName(const char *name)
 		    if (!id || !*id) {
 			if (id)
 			    drmFreeBusid(id);
-			return fd;
 		    } else {
 			drmFreeBusid(id);
+			return fd;
 		    }
 		} else {
 		    drmFreeVersion(version);
-- 
1.8.4



More information about the mesa-dev mailing list