mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
drm/amdgpu: fix a warning in amdgpu_ras.c (v2)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c: In function ‘amdgpu_ras_fs_init’: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1284:2: warning: ignoring return value of ‘sysfs_create_group’, declared with attribute warn_unused_result [-Wunused-result] 1284 | sysfs_create_group(&adev->dev->kobj, &group); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ v2: just print an error for sysfs group creation failure Acked-by: Nirmoy Das <nirmoy.das@amd.com> Reviewed-by: Luben Tuikov <luben.tuikov@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
c3d4d45db2
commit
a069a9eb73
1 changed files with 4 additions and 1 deletions
|
@ -1266,6 +1266,7 @@ static int amdgpu_ras_fs_init(struct amdgpu_device *adev)
|
|||
NULL,
|
||||
NULL,
|
||||
};
|
||||
int r;
|
||||
|
||||
/* add features entry */
|
||||
con->features_attr = dev_attr_features;
|
||||
|
@ -1281,7 +1282,9 @@ static int amdgpu_ras_fs_init(struct amdgpu_device *adev)
|
|||
sysfs_bin_attr_init(bin_attrs[0]);
|
||||
}
|
||||
|
||||
sysfs_create_group(&adev->dev->kobj, &group);
|
||||
r = sysfs_create_group(&adev->dev->kobj, &group);
|
||||
if (r)
|
||||
dev_err(adev->dev, "Failed to create RAS sysfs group!");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue