]> git.sur5r.net Git - u-boot/blobdiff - drivers/usb/gadget/ether.c
USB-CDC: correct wrong alignment in ether.c
[u-boot] / drivers / usb / gadget / ether.c
index 8126f76861a3ad34339bc44013b99584acdd5a96..9fc6a369c31ef904232d15057abf322d9e2836e9 100644 (file)
@@ -677,7 +677,7 @@ static struct usb_gadget_strings    stringtab = {
 
 /*============================================================================*/
 static u8 control_req[USB_BUFSIZ];
-static u8 status_req[STATUS_BYTECOUNT];
+static u8 status_req[STATUS_BYTECOUNT] __attribute__ ((aligned(4)));
 
 
 
@@ -801,7 +801,7 @@ done:
 
        /* on error, disable any endpoints  */
        if (result < 0) {
-               if (!subset_active(dev))
+               if (!subset_active(dev) && dev->status_ep)
                        (void) usb_ep_disable (dev->status_ep);
                dev->status = NULL;
                (void) usb_ep_disable (dev->in_ep);