File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
drivers/gpu/drm/amd/amdgpu Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1564,7 +1564,8 @@ static void amdgpu_ras_sysfs_remove_bad_page_node(struct amdgpu_device *adev)
1564
1564
{
1565
1565
struct amdgpu_ras * con = amdgpu_ras_get_context (adev );
1566
1566
1567
- sysfs_remove_file_from_group (& adev -> dev -> kobj ,
1567
+ if (adev -> dev -> kobj .sd )
1568
+ sysfs_remove_file_from_group (& adev -> dev -> kobj ,
1568
1569
& con -> badpages_attr .attr ,
1569
1570
RAS_FS_NAME );
1570
1571
}
@@ -1583,7 +1584,8 @@ static int amdgpu_ras_sysfs_remove_dev_attr_node(struct amdgpu_device *adev)
1583
1584
.attrs = attrs ,
1584
1585
};
1585
1586
1586
- sysfs_remove_group (& adev -> dev -> kobj , & group );
1587
+ if (adev -> dev -> kobj .sd )
1588
+ sysfs_remove_group (& adev -> dev -> kobj , & group );
1587
1589
1588
1590
return 0 ;
1589
1591
}
@@ -1630,7 +1632,8 @@ int amdgpu_ras_sysfs_remove(struct amdgpu_device *adev,
1630
1632
if (!obj || !obj -> attr_inuse )
1631
1633
return - EINVAL ;
1632
1634
1633
- sysfs_remove_file_from_group (& adev -> dev -> kobj ,
1635
+ if (adev -> dev -> kobj .sd )
1636
+ sysfs_remove_file_from_group (& adev -> dev -> kobj ,
1634
1637
& obj -> sysfs_attr .attr ,
1635
1638
RAS_FS_NAME );
1636
1639
obj -> attr_inuse = 0 ;
You can’t perform that action at this time.
0 commit comments