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

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

 



On Wed, 09 Oct 2019, Colin King <colin.king@xxxxxxxxxxxxx> wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
>
> An earlier commit removed any error assignments to err and we
> are now left with a zero assignment to err and a check that is
> always false. Clean this up by removing the redundant variable
> err and the error check.
>
> Addresses-Coverity: ("'Constant' variable guard")
> Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>

Fixes: b1e3177bd1d8 ("drm/i915: Coordinate i915_active with its own mutex")
Reviewed-by: Jani Nikula <jani.nikula@xxxxxxxxx>


BR,
Jani.


> ---
>  drivers/gpu/drm/i915/i915_active.c | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c
> index aa37c07004b9..67305165c12a 100644
> --- a/drivers/gpu/drm/i915/i915_active.c
> +++ b/drivers/gpu/drm/i915/i915_active.c
> @@ -438,7 +438,6 @@ static void enable_signaling(struct i915_active_fence *active)
>  int i915_active_wait(struct i915_active *ref)
>  {
>  	struct active_node *it, *n;
> -	int err = 0;
>  
>  	might_sleep();
>  
> @@ -456,8 +455,6 @@ int i915_active_wait(struct i915_active *ref)
>  	/* Any fence added after the wait begins will not be auto-signaled */
>  
>  	i915_active_release(ref);
> -	if (err)
> -		return err;
>  
>  	if (wait_var_event_interruptible(ref, i915_active_is_idle(ref)))
>  		return -EINTR;

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux