summaryrefslogtreecommitdiff
path: root/drivers/hv/ring_buffer.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2017-03-05 04:27:15 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-17 09:10:49 +0300
commit42dd2715428f24d4ac990ed9207ce28c60a4b7f6 (patch)
tree649665dbd81b16c9b30f16381556800668115a3b /drivers/hv/ring_buffer.c
parentbdc1dd47dbcd39f266f0a6c8727a2b1995b36ef2 (diff)
downloadlinux-42dd2715428f24d4ac990ed9207ce28c60a4b7f6.tar.xz
hyperv: remove unnecessary return variable
hv_ringbuffer_read cleanup. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv/ring_buffer.c')
-rw-r--r--drivers/hv/ring_buffer.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/hv/ring_buffer.c b/drivers/hv/ring_buffer.c
index 52d0556a5a25..8a249740b4b4 100644
--- a/drivers/hv/ring_buffer.c
+++ b/drivers/hv/ring_buffer.c
@@ -341,13 +341,11 @@ int hv_ringbuffer_read(struct vmbus_channel *channel,
struct vmpacket_descriptor desc;
u32 offset;
u32 packetlen;
- int ret = 0;
struct hv_ring_buffer_info *inring_info = &channel->inbound;
if (buflen <= 0)
return -EINVAL;
-
*buffer_actual_len = 0;
*requestid = 0;
@@ -358,7 +356,7 @@ int hv_ringbuffer_read(struct vmbus_channel *channel,
* No error is set when there is even no header, drivers are
* supposed to analyze buffer_actual_len.
*/
- return ret;
+ return 0;
}
init_cached_read_index(channel);
@@ -403,5 +401,5 @@ int hv_ringbuffer_read(struct vmbus_channel *channel,
hv_signal_on_read(channel);
- return ret;
+ return 0;
}