Commit ac2b41ac authored by Bart Westgeest's avatar Bart Westgeest Committed by Greg Kroah-Hartman

staging: usbip: changed function return type to void

The function usbip_pad_iso never returns anything but 0 (success).
Signed-off-by: default avatarBart Westgeest <bart@elbrys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 98b9de21
...@@ -735,26 +735,25 @@ EXPORT_SYMBOL_GPL(usbip_recv_iso); ...@@ -735,26 +735,25 @@ EXPORT_SYMBOL_GPL(usbip_recv_iso);
* buffer and iso packets need to be stored and be in propeper endian in urb * buffer and iso packets need to be stored and be in propeper endian in urb
* before calling this function * before calling this function
*/ */
int usbip_pad_iso(struct usbip_device *ud, struct urb *urb) void usbip_pad_iso(struct usbip_device *ud, struct urb *urb)
{ {
int np = urb->number_of_packets; int np = urb->number_of_packets;
int i; int i;
int ret;
int actualoffset = urb->actual_length; int actualoffset = urb->actual_length;
if (!usb_pipeisoc(urb->pipe)) if (!usb_pipeisoc(urb->pipe))
return 0; return;
/* if no packets or length of data is 0, then nothing to unpack */ /* if no packets or length of data is 0, then nothing to unpack */
if (np == 0 || urb->actual_length == 0) if (np == 0 || urb->actual_length == 0)
return 0; return;
/* /*
* if actual_length is transfer_buffer_length then no padding is * if actual_length is transfer_buffer_length then no padding is
* present. * present.
*/ */
if (urb->actual_length == urb->transfer_buffer_length) if (urb->actual_length == urb->transfer_buffer_length)
return 0; return;
/* /*
* loop over all packets from last to first (to prevent overwritting * loop over all packets from last to first (to prevent overwritting
...@@ -766,8 +765,6 @@ int usbip_pad_iso(struct usbip_device *ud, struct urb *urb) ...@@ -766,8 +765,6 @@ int usbip_pad_iso(struct usbip_device *ud, struct urb *urb)
urb->transfer_buffer + actualoffset, urb->transfer_buffer + actualoffset,
urb->iso_frame_desc[i].actual_length); urb->iso_frame_desc[i].actual_length);
} }
return ret;
} }
EXPORT_SYMBOL_GPL(usbip_pad_iso); EXPORT_SYMBOL_GPL(usbip_pad_iso);
......
...@@ -306,7 +306,7 @@ void usbip_header_correct_endian(struct usbip_header *pdu, int send); ...@@ -306,7 +306,7 @@ void usbip_header_correct_endian(struct usbip_header *pdu, int send);
void *usbip_alloc_iso_desc_pdu(struct urb *urb, ssize_t *bufflen); void *usbip_alloc_iso_desc_pdu(struct urb *urb, ssize_t *bufflen);
/* some members of urb must be substituted before. */ /* some members of urb must be substituted before. */
int usbip_recv_iso(struct usbip_device *ud, struct urb *urb); int usbip_recv_iso(struct usbip_device *ud, struct urb *urb);
int usbip_pad_iso(struct usbip_device *ud, struct urb *urb); void usbip_pad_iso(struct usbip_device *ud, struct urb *urb);
int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb); int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb);
/* usbip_event.c */ /* usbip_event.c */
......
...@@ -94,8 +94,7 @@ static void vhci_recv_ret_submit(struct vhci_device *vdev, ...@@ -94,8 +94,7 @@ static void vhci_recv_ret_submit(struct vhci_device *vdev,
return; return;
/* restore the padding in iso packets */ /* restore the padding in iso packets */
if (usbip_pad_iso(ud, urb) < 0) usbip_pad_iso(ud, urb);
return;
if (usbip_dbg_flag_vhci_rx) if (usbip_dbg_flag_vhci_rx)
usbip_dump_urb(urb); usbip_dump_urb(urb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment