Re: [PATCH v2 02/27] staging: unisys: visorchipset change -1 return value

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

 



On Tue, May 31, 2016 at 10:26:28PM -0400, David Kershner wrote:
> From: Erik Arfvidson <erik.arfvidson@xxxxxxxxxx>
> 
> This patch changes the vague -1 return value to -EINVAL
> 
> Signed-off-by: Erik Arfvidson <erik.arfvidson@xxxxxxxxxx>
> Signed-off-by: David Kershner <david.kershner@xxxxxxxxxx>
> Reviewed-by: Tim Sell <Timothy.Sell@xxxxxxxxxx>
> ---
>  drivers/staging/unisys/visorbus/visorchipset.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c
> index 5ba5936..d248c94 100644
> --- a/drivers/staging/unisys/visorbus/visorchipset.c
> +++ b/drivers/staging/unisys/visorbus/visorchipset.c
> @@ -1613,7 +1613,7 @@ parahotplug_request_complete(int id, u16 active)
>  	}
>  
>  	spin_unlock(&parahotplug_request_list_lock);
> -	return -1;
> +	return -EINVAL;
>  }
>  
>  /*
> -- 
> 1.9.1
> 
Why return anything here, every caller of this function ignores the return code
entirely.  Alternatively, passing the EINVAL back from the caller seems
reasonable.

Neil

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux