]> Git Repo - linux.git/commitdiff
drm/amd/amdgpu/amdgpu_mes: Ensure amdgpu_bo_create_kernel()'s return value is checked
authorLee Jones <[email protected]>
Fri, 17 Mar 2023 08:16:58 +0000 (08:16 +0000)
committerAlex Deucher <[email protected]>
Wed, 22 Mar 2023 04:48:00 +0000 (00:48 -0400)
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c: In function ‘amdgpu_mes_ctx_alloc_meta_data’:
 drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c:1099:13: warning: variable ‘r’ set but not used [-Wunused-but-set-variable]

Cc: Alex Deucher <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: "Pan, Xinhui" <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Sumit Semwal <[email protected]>
Cc: Jack Xiao <[email protected]>
Cc: Hawking Zhang <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c

index 82e27bd4f038363f155277995639e2d315b9eb26..30cd72ca1eefd0034185545e9c47d45e73d276c2 100644 (file)
@@ -1104,6 +1104,11 @@ int amdgpu_mes_ctx_alloc_meta_data(struct amdgpu_device *adev,
                            &ctx_data->meta_data_obj,
                            &ctx_data->meta_data_mc_addr,
                            &ctx_data->meta_data_ptr);
+       if (r) {
+               dev_warn(adev->dev, "(%d) create CTX bo failed\n", r);
+               return r;
+       }
+
        if (!ctx_data->meta_data_obj)
                return -ENOMEM;
 
This page took 0.065128 seconds and 4 git commands to generate.