hyperv: remove unnecessary return variable
authorStephen Hemminger <stephen@networkplumber.org>
Sun, 5 Mar 2017 01:27:15 +0000 (18:27 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Mar 2017 06:10:49 +0000 (15:10 +0900)
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>
drivers/hv/ring_buffer.c

index 52d0556a5a25b8c667fff1f215baf13c72662a1c..8a249740b4b401ea8f8a47f7985ac40354381194 100644 (file)
@@ -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;
 }