libhsakmt: Handle unaccessible p2p_links

Device cgroup can limit accessible devices. Handle the cases where
p2p_links are not accessible



Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Change-Id: I513dc75ad14e4f2d426cf2fbd301bcba12b4ee54
This commit is contained in:
Harish Kasiviswanathan
2021-05-17 12:40:52 -04:00
rodzic 9e0fc7f3c6
commit e28b3fe8b3
+2 -1
Wyświetl plik
@@ -1476,7 +1476,8 @@ static HSAKMT_STATUS topology_sysfs_get_iolink_props(uint32_t node_id,
read_size = fread(read_buf, 1, PAGE_SIZE, fd);
if (read_size <= 0) {
ret = HSAKMT_STATUS_ERROR;
ret = (errno == EPERM) ? HSAKMT_STATUS_NOT_SUPPORTED :
HSAKMT_STATUS_ERROR;
goto err2;
}