RE: [patch] hv: vmbus: fix vmbus_recvpacket_raw() return code

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

 




> -----Original Message-----
> From: Dan Carpenter [mailto:dan.carpenter@xxxxxxxxxx]
> Sent: Monday, September 16, 2013 2:59 PM
> To: KY Srinivasan
> Cc: Haiyang Zhang; devel@xxxxxxxxxxxxxxxxxxxxxx
> 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.carpenter@xxxxxxxxxx>
Signed-off-by: K. Y. Srinivasan <kys@xxxxxxxxxxxxx>
> 
> 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
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