drm/amdgpu: Simplify cleanup check for FRU sysfs
authorLijo Lazar <lijo.lazar@amd.com>
Fri, 29 Nov 2024 02:50:45 +0000 (08:20 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 10 Dec 2024 15:26:49 +0000 (10:26 -0500)
FRU info is expected to be non-NULL if FRU sys files are created.
Simplify the check.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c

index ceb5163480f4c2f5103088cb28956eb972ef785f..09c9194d5bd58dff567761abc0bb05ea3c34d5d4 100644 (file)
@@ -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);