drm/amdgpu: Remove unnecessary return value check
authorLijo Lazar <lijo.lazar@amd.com>
Thu, 1 Dec 2022 11:52:01 +0000 (17:22 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 13:50:34 +0000 (09:50 -0400)
There is no need to check return value, as the function internally
used - amdgpu_discovery_read_binary_from_vram() - returns void.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Le Ma <le.ma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c

index e6d10a3f1753c4ba18851fdc1a11ed018c1eb6e7..5b6088fc2b2bce4aef08025691433e6446d1eb3b 100644 (file)
@@ -201,14 +201,13 @@ static int hw_id_map[MAX_HWIP] = {
        [PCIE_HWIP]     = PCIE_HWID,
 };
 
-static int amdgpu_discovery_read_binary_from_vram(struct amdgpu_device *adev, uint8_t *binary)
+static void amdgpu_discovery_read_binary_from_vram(struct amdgpu_device *adev, uint8_t *binary)
 {
        uint64_t vram_size = (uint64_t)RREG32(mmRCC_CONFIG_MEMSIZE) << 20;
        uint64_t pos = vram_size - DISCOVERY_TMR_OFFSET;
 
        amdgpu_device_vram_access(adev, pos, (uint32_t *)binary,
                                  adev->mman.discovery_tmr_size, false);
-       return 0;
 }
 
 static int amdgpu_discovery_read_binary_from_file(struct amdgpu_device *adev, uint8_t *binary)
@@ -302,12 +301,7 @@ static int amdgpu_discovery_init(struct amdgpu_device *adev)
        if (!adev->mman.discovery_bin)
                return -ENOMEM;
 
-       r = amdgpu_discovery_read_binary_from_vram(adev, adev->mman.discovery_bin);
-       if (r) {
-               dev_err(adev->dev, "failed to read ip discovery binary from vram\n");
-               r = -EINVAL;
-               goto out;
-       }
+       amdgpu_discovery_read_binary_from_vram(adev, adev->mman.discovery_bin);
 
        if (!amdgpu_discovery_verify_binary_signature(adev->mman.discovery_bin) || amdgpu_discovery == 2) {
                /* ignore the discovery binary from vram if discovery=2 in kernel module parameter */