USB: add free_len=0 initialization to ipaq.c

From: Pete Zaitcev
Date: Tue Jul 27 2004 - 13:48:34 EST


This is what happens when driver writers neglect memset after kmalloc.
Patch by Ganesh Varadaraja.

diff -urp -X dontdiff linux-2.4.27-rc3/drivers/usb/serial/ipaq.c linux-2.4.27-rc3-usbx/drivers/usb/serial/ipaq.c
--- linux-2.4.27-rc3/drivers/usb/serial/ipaq.c 2003-11-29 18:53:05.000000000 -0800
+++ linux-2.4.27-rc3-usbx/drivers/usb/serial/ipaq.c 2004-07-27 10:30:49.000000000 -0700
@@ -188,6 +188,7 @@ static int ipaq_open(struct usb_serial_p
port->private = (void *)priv;
priv->active = 0;
priv->queue_len = 0;
+ priv->free_len = 0;
INIT_LIST_HEAD(&priv->queue);
INIT_LIST_HEAD(&priv->freelist);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/