Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Lijo Lazar and committed by
Alex Deucher
edd628ad e1a34ed9

+1 -1
+1 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
··· 384 384 385 385 void amdgpu_fru_sysfs_fini(struct amdgpu_device *adev) 386 386 { 387 - if (!is_fru_eeprom_supported(adev, NULL) || !adev->fru_info) 387 + if (!adev->fru_info) 388 388 return; 389 389 390 390 sysfs_remove_files(&adev->dev->kobj, amdgpu_fru_attributes);