drm/amdgpu: Simplify cleanup check for FRU sysfs
Subsystems (2)
PATCH 1/1 drm/amdgpu: Simplify cleanup check for FRU sysfs
FRU info is expected to be non-NULL if FRU sys files are created. Simplify the check.
Signed-off-by Lijo Lazar <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +1 -1
@@ -384,7 +384,7 @@ int amdgpu_fru_sysfs_init(struct amdgpu_device *adev)void amdgpu_fru_sysfs_fini (struct amdgpu_device *adev) { -if (!is_fru_eeprom_supported (adev,NULL ) || !adev->fru_info) +if (!adev->fru_info)return ;sysfs_remove_files (&adev->dev->kobj, amdgpu_fru_attributes);
Signature · 1 line
2.25.1
[AMD Official Use Only - AMD Internal Distribution Only]
Reviewed-by Hawking Zhang <[email protected]>
Regards,
Hawking
-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Friday, November 29, 2024 10:54
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu: Simplify cleanup check for FRU sysfs
FRU info is expected to be non-NULL if FRU sys files are created. Simplify the check.
Signed-off-by Lijo Lazar <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c +1 -2
@@ -384,7 +384,7 @@ int amdgpu_fru_sysfs_init(struct amdgpu_device *adev)void amdgpu_fru_sysfs_fini (struct amdgpu_device *adev) { -if (!is_fru_eeprom_supported (adev,NULL ) || !adev->fru_info) +if (!adev->fru_info)return ;sysfs_remove_files (&adev->dev->kobj, amdgpu_fru_attributes); --
2.25.1