1
0
mirror of https://github.com/tiagovignatti/intel-gpu-tools.git synced 2025-08-26 10:01:19 +00:00

lib: Close non intel fds in drm_get_card()

When going through card%u devices, close the ones that we were able to
open but weren't intel devices.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
Damien Lespiau 2013-10-24 15:04:26 +01:00
parent 949ce5b8a1
commit 8329acb752

@ -187,8 +187,10 @@ int drm_get_card(void)
if (fd == -1)
continue;
if (!is_intel(fd))
if (!is_intel(fd)) {
close(fd);
continue;
}
close(fd);
return i;