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>
main
Emil Velikov 2015-07-14 15:05:18 +01:00
parent c86dabfc9f
commit c1cd3d9388
1 changed files with 1 additions and 1 deletions

View File

@ -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);