mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-12 10:26:12 +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)
|
if (fd == -1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!is_intel(fd))
|
if (!is_intel(fd)) {
|
||||||
|
close(fd);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
return i;
|
return i;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user