[PATCH] drm/i915/uc: Simplify an error handling path in uc_fw_rsa_data_create()

From: Christophe JAILLET
Date: Sun Nov 05 2023 - 05:45:13 EST


i915_vma_unpin_and_release() is already called in the error handling path,
there is no need to call it here as well.

It is harmless, because the 2nd call will be a no-op, but it is cleaner
and less verbose.

Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
---
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
index 362639162ed6..228c58f38489 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
@@ -1216,7 +1216,6 @@ static int uc_fw_rsa_data_create(struct intel_uc_fw *uc_fw)
vaddr = i915_gem_object_pin_map_unlocked(vma->obj,
intel_gt_coherent_map_type(gt, vma->obj, true));
if (IS_ERR(vaddr)) {
- i915_vma_unpin_and_release(&vma, 0);
err = PTR_ERR(vaddr);
goto unpin_out;
}
--
2.34.1