drm/amdgpu: fix uninitialized variable warning for amdgpu_xgmi
[ Upstream commit 8f184f8e7a ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
820dcbd38a
commit
d32081a430
@@ -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