drm/amdgpu: fix uninitialized variable warning for amdgpu_xgmi

Clear warning that using uninitialized variable current_node.

Signed-off-by: Tim Huang <Tim.Huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Tim Huang
2024-05-06 13:48:57 +08:00
committed by Alex Deucher
parent 3aa6b72045
commit 8f184f8e7a
+3
View File
@@ -434,6 +434,9 @@ static ssize_t amdgpu_xgmi_show_connected_port_num(struct device *dev,
}
}
if (i == top->num_nodes)
return -EINVAL;
for (i = 0; i < top->num_nodes; i++) {
for (j = 0; j < top->nodes[i].num_links; j++)
/* node id in sysfs starts from 1 rather than 0 so +1 here */