> -----Original Message-----
> From: Dan Carpenter [mailto:dan.carpen...@oracle.com]
> Sent: Monday, September 16, 2013 2:59 PM
> To: KY Srinivasan
> Cc: Haiyang Zhang; de...@linuxdriverproject.org
> Subject: [patch] hv: vmbus: fix vmbus_recvpacket_raw() return code
> 
> Don't return success if the buffer has not been initialized.
> 
> Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
Signed-off-by: K. Y. Srinivasan <k...@microsoft.com>
> 
> diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
> index 6de6c98..b05293c 100644
> --- a/drivers/hv/channel.c
> +++ b/drivers/hv/channel.c
> @@ -855,6 +855,6 @@ int vmbus_recvpacket_raw(struct vmbus_channel
> *channel, void *buffer,
>       if (signal)
>               vmbus_setevent(channel);
> 
> -     return 0;
> +     return ret;

Thanks Dan. In this case, by the time we get here, all other failure conditions 
have been
handled and that is the reason I had returned 0. 

>  }
>  EXPORT_SYMBOL_GPL(vmbus_recvpacket_raw);
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to