diff options
author | Emil Velikov <emil.l.velikov@gmail.com> | 2015-07-14 15:05:18 +0100 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2015-07-16 16:41:49 +0100 |
commit | c1cd3d93881a9b4a27f7190393ccc7a0236d28a4 (patch) | |
tree | f10acbcc22f06cc445546666d56fb1c926d258bb | |
parent | c86dabfc9f046e835ddbd01d28c45f9cf7c1f368 (diff) |
xf86drm: fix incorrect fd comparison in drmOpenOnce{,WithType}
Spotted by looking for similar "let's assume fd == 0 is invalid" bugs.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
-rw-r--r-- | xf86drm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2619,7 +2619,7 @@ int drmOpenOnceWithType(const char *BusID, int *newlyopened, int type) } fd = drmOpenWithType(NULL, BusID, type); - if (fd <= 0 || nr_fds == DRM_MAX_FDS) + if (fd < 0 || nr_fds == DRM_MAX_FDS) return fd; connection[nr_fds].BusID = strdup(BusID); |