[PATCH 07/10] drm/amd/amdgpu: Deal with possible fail allocation
Arthur Grillo
arthurgrillo at riseup.net
Mon Feb 13 20:49:20 UTC 2023
Deal with return value of an allocation. This reduces the number of
-Wunused-but-set-variable warnings.
Signed-off-by: Arthur Grillo <arthurgrillo at riseup.net>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
index 82e27bd4f038..00c0876840c1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
@@ -1104,6 +1104,8 @@ 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)
+ return r;
if (!ctx_data->meta_data_obj)
return -ENOMEM;
--
2.39.1
More information about the amd-gfx
mailing list