mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-11 01:46:14 +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:
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user