summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2002-11-25 16:02:43 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2002-11-25 16:02:43 +0000
commite04ed6376b5959e49fe82ad3dc0c7b4bff2cd6d5 (patch)
treeb8ccfb9e67634209bc45fb822cab3f00a4ba76b9
parent683fe4276a435f4381cac8fbb457cbbd25471ffd (diff)
added missing return fd (Alexander Stohr)mesa-4-1-branch
-rw-r--r--libdrm/xf86drm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c
index 0532a1ec..6c830664 100644
--- a/libdrm/xf86drm.c
+++ b/libdrm/xf86drm.c
@@ -245,6 +245,7 @@ static int drmOpenDevice(long dev, int minor)
fd = open(buf, O_RDWR, 0);
drmMsg("drmOpenDevice: open result is %d, (%s)\n",
fd, fd < 0 ? strerror(errno) : "OK");
+ if (fd >= 0) return fd;
drmMsg("drmOpenDevice: Open failed\n");
remove(buf);