summaryrefslogtreecommitdiffstats
path: root/src/drivers
diff options
context:
space:
mode:
authorMichael Brown2017-03-21 13:21:54 +0100
committerMichael Brown2017-03-21 13:21:54 +0100
commit7b113bc744a4c15f25c2dfb4b8560da8be21bfbd (patch)
tree36de33c88d1b6343083d55707a346e4bfddfc0fd /src/drivers
parent[librm] Fail gracefully if asked to ioremap() a zero length (diff)
downloadipxe-7b113bc744a4c15f25c2dfb4b8560da8be21bfbd.tar.gz
ipxe-7b113bc744a4c15f25c2dfb4b8560da8be21bfbd.tar.xz
ipxe-7b113bc744a4c15f25c2dfb4b8560da8be21bfbd.zip
[usb] Use correct length for memcpy()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/bus/usb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/bus/usb.c b/src/drivers/bus/usb.c
index 880e3f08..cad26c77 100644
--- a/src/drivers/bus/usb.c
+++ b/src/drivers/bus/usb.c
@@ -1022,7 +1022,8 @@ static int usb_describe ( struct usb_device *usb,
}
/* Describe function */
- memcpy ( &desc->class, &interface->class, sizeof ( desc->class ) );
+ memcpy ( &desc->class.class, &interface->class,
+ sizeof ( desc->class.class ) );
desc->count = 1;
interfaces[0] = first;