Re: [PATCH][next] drm/i915: remove redundant assignement to variable err

From: Andi Shyti
Date: Mon Apr 15 2024 - 07:21:56 EST


Hi Colin,

On Mon, Apr 15, 2024 at 10:56:59AM +0100, Colin Ian King wrote:
> The variable err is being assigned a value 0 that is never read, the
> break statement escapes a do-while loop and then the code returns
> without referencing err. The assignment is redundant and can be
> removed.
>
> Cleans up clang scan build warning:
> drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c:1075:5: warning: Value
> stored to 'err' is never read [deadcode.DeadStores]
>
> Signed-off-by: Colin Ian King <colin.i.king@xxxxxxxxx>

Reviewed-by: Andi Shyti <andi.shyti@xxxxxxxxxxxxxxx>

Thanks,
Andi