drivers/usb/hub.c +3 -3
@@ -150,14 +150,14 @@
unsigned int pipe;
int i, maxp, ret;
- hub->descriptor = kmalloc(sizeof(hub->descriptor), GFP_KERNEL);
+ hub->descriptor = kmalloc(sizeof(*hub->descriptor), GFP_KERNEL);
if (!hub->descriptor) {
- err("Unable to kmalloc %d bytes for hub descriptor", sizeof(hub->descriptor));
+ err("Unable to kmalloc %d bytes for hub descriptor", sizeof(*hub->descriptor));
return -1;
}
/* Request the entire hub descriptor. */
- ret = usb_get_hub_descriptor(dev, hub->descriptor, sizeof(hub->descriptor));
+ ret = usb_get_hub_descriptor(dev, hub->descriptor, sizeof(*hub->descriptor));
/* <hub->descriptor> is large enough for a hub with 127 ports;
* the hub can/will return fewer bytes here. */
if (ret < 0) {