--- linux-2.4.2-ac5/drivers/usb/hub.c   Tue Feb 27 15:52:05 2001
+++ linux-2.4.2-ac5-p3/drivers/usb/hub.c        Tue Feb 27 16:21:32 2001
@@ -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) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to