Subject: Re: [net-next PATCH 3/6] macvtap: remove the dead branch

From: Guenter Roeck <[email-masked]>
Date: Thu, 05 Dec 2013 22:08:20 -0800

On 12/05/2013 02:28 PM, Zhi Yong Wu wrote:
> From: Zhi Yong Wu <[email-masked]>
>
> Signed-off-by: Zhi Yong Wu <[email-masked]>
> ---
>   drivers/net/macvtap.c |    2 --
>   1 files changed, 0 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
> index 9093004..d271fb4 100644
> --- a/drivers/net/macvtap.c
> +++ b/drivers/net/macvtap.c
> @@ -779,8 +779,6 @@ static ssize_t macvtap_put_user(struct macvtap_queue *q,
>   			return -EINVAL;
>
>   		ret = macvtap_skb_to_vnet_hdr(skb, &vnet_hdr);
> -		if (ret)
> -			return ret;
>
Assigning the function's return value to ret just to ignore it seems odd.

Might make sense to change the function type to void.

Guenter