dfu: Properly zero out timeout value
authorPantelis Antoniou <panto@antoniou-consulting.com>
Fri, 30 Nov 2012 08:01:10 +0000 (08:01 +0000)
committerMarek Vasut <marex@denx.de>
Sat, 16 Mar 2013 20:12:01 +0000 (21:12 +0100)
Zero out timeout value; letting it filled with undefined values
ends up with the dfu host hanging.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
drivers/usb/gadget/f_dfu.c

index 10547e3279b6aadac2cc376ea2d5efd281147ad2..a322ae5eb8720751a7178984e1422fa67b80cd5d 100644 (file)
@@ -164,6 +164,9 @@ static void handle_getstatus(struct usb_request *req)
 
        /* send status response */
        dstat->bStatus = f_dfu->dfu_status;
+       dstat->bwPollTimeout[0] = 0;
+       dstat->bwPollTimeout[1] = 0;
+       dstat->bwPollTimeout[2] = 0;
        dstat->bState = f_dfu->dfu_state;
        dstat->iString = 0;
 }