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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user