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

Message ID 0468666539199f4a440c0a60553b24832a50256a.1699180889.git.christophe.jaillet@wanadoo.fr
State New
Headers
Series drm/i915/uc: Simplify an error handling path in uc_fw_rsa_data_create() |

Commit Message

Christophe JAILLET Nov. 5, 2023, 10:45 a.m. UTC
  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@wanadoo.fr>
---
 drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 1 -
 1 file changed, 1 deletion(-)
  

Patch

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;
 	}