[PATCH 07/10] drm/amd/amdgpu: Deal with possible fail allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Deal with return value of an allocation. This reduces the number of
-Wunused-but-set-variable warnings.

Signed-off-by: Arthur Grillo <arthurgrillo@xxxxxxxxxx>
---
 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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux