Re: [PATCH 02/23] drm/i915/selftest: Fix error handling in igt_vma_remapped_gtt()

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

 



On Thu, Mar 11, 2021 at 12:17:15AM +0200, Imre Deak wrote:
> An inner scope version of err shadows the variable in the outer scope,
> and err doesn't get set after a failure, fix these.
> 
> Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx>

Reviewed-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

> ---
>  drivers/gpu/drm/i915/selftests/i915_vma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/selftests/i915_vma.c b/drivers/gpu/drm/i915/selftests/i915_vma.c
> index 065a9d82ad5c..2c067343d65f 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_vma.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_vma.c
> @@ -890,7 +890,6 @@ static int igt_vma_remapped_gtt(void *arg)
>  			struct i915_vma *vma;
>  			u32 __iomem *map;
>  			unsigned int x, y;
> -			int err;
>  
>  			vma = i915_gem_object_ggtt_pin(obj, &view, 0, 0, PIN_MAPPABLE);
>  			if (IS_ERR(vma)) {
> @@ -956,6 +955,7 @@ static int igt_vma_remapped_gtt(void *arg)
>  						       *t == I915_GGTT_VIEW_ROTATED ? "Rotated" : "Remapped",
>  						       val, exp);
>  						i915_vma_unpin_iomap(vma);
> +						err = -EINVAL;
>  						goto out;
>  					}
>  				}
> -- 
> 2.25.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




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

  Powered by Linux