提交 42dd2715 编写于 作者: S Stephen Hemminger 提交者: Greg Kroah-Hartman

hyperv: remove unnecessary return variable

hv_ringbuffer_read cleanup.
Signed-off-by: NStephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 bdc1dd47
...@@ -341,13 +341,11 @@ int hv_ringbuffer_read(struct vmbus_channel *channel, ...@@ -341,13 +341,11 @@ int hv_ringbuffer_read(struct vmbus_channel *channel,
struct vmpacket_descriptor desc; struct vmpacket_descriptor desc;
u32 offset; u32 offset;
u32 packetlen; u32 packetlen;
int ret = 0;
struct hv_ring_buffer_info *inring_info = &channel->inbound; struct hv_ring_buffer_info *inring_info = &channel->inbound;
if (buflen <= 0) if (buflen <= 0)
return -EINVAL; return -EINVAL;
*buffer_actual_len = 0; *buffer_actual_len = 0;
*requestid = 0; *requestid = 0;
...@@ -358,7 +356,7 @@ int hv_ringbuffer_read(struct vmbus_channel *channel, ...@@ -358,7 +356,7 @@ int hv_ringbuffer_read(struct vmbus_channel *channel,
* No error is set when there is even no header, drivers are * No error is set when there is even no header, drivers are
* supposed to analyze buffer_actual_len. * supposed to analyze buffer_actual_len.
*/ */
return ret; return 0;
} }
init_cached_read_index(channel); init_cached_read_index(channel);
...@@ -403,5 +401,5 @@ int hv_ringbuffer_read(struct vmbus_channel *channel, ...@@ -403,5 +401,5 @@ int hv_ringbuffer_read(struct vmbus_channel *channel,
hv_signal_on_read(channel); hv_signal_on_read(channel);
return ret; return 0;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册