[Mesa-dev] [PATCH] fix typo which makes drmOpen("VALID_NAME", NULL) to return NULL
Guo Yejun
yejun.guo at intel.com
Sun Nov 16 17:44:31 PST 2014
Signed-off-by: Guo Yejun <yejun.guo at intel.com>
---
xf86drm.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/xf86drm.c b/xf86drm.c
index d900b4b..40997d2 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -553,9 +553,8 @@ static int drmOpenByName(const char *name)
drmFreeVersion(version);
id = drmGetBusid(fd);
drmMsg("drmGetBusid returned '%s'\n", id ? id : "NULL");
- if (!id || !*id) {
- if (id)
- drmFreeBusid(id);
+ if (id) {
+ drmFreeBusid(id);
return fd;
} else {
drmFreeBusid(id);
--
1.9.1
More information about the mesa-dev
mailing list