diff options
-rw-r--r-- | drivers/staging/ozwpan/ozusbsvc1.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/staging/ozwpan/ozusbsvc1.c b/drivers/staging/ozwpan/ozusbsvc1.c index b573ad3e9674..7b13dc910172 100644 --- a/drivers/staging/ozwpan/ozusbsvc1.c +++ b/drivers/staging/ozwpan/ozusbsvc1.c | |||
@@ -326,7 +326,10 @@ static void oz_usb_handle_ep_data(struct oz_usb_ctx *usb_ctx, | |||
326 | struct oz_multiple_fixed *body = | 326 | struct oz_multiple_fixed *body = |
327 | (struct oz_multiple_fixed *)data_hdr; | 327 | (struct oz_multiple_fixed *)data_hdr; |
328 | u8 *data = body->data; | 328 | u8 *data = body->data; |
329 | int n = (len - sizeof(struct oz_multiple_fixed)+1) | 329 | int n; |
330 | if (!body->unit_size) | ||
331 | break; | ||
332 | n = (len - sizeof(struct oz_multiple_fixed)+1) | ||
330 | / body->unit_size; | 333 | / body->unit_size; |
331 | while (n--) { | 334 | while (n--) { |
332 | oz_hcd_data_ind(usb_ctx->hport, body->endpoint, | 335 | oz_hcd_data_ind(usb_ctx->hport, body->endpoint, |