Browse Source

USB: omninet: use kzalloc for private data

Make sure the port private data, which contains the write sequence
number, is cleared at allocation.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johan Hovold 12 years ago
parent
commit
81f58c67b1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/usb/serial/omninet.c

+ 1 - 1
drivers/usb/serial/omninet.c

@@ -112,7 +112,7 @@ static int omninet_port_probe(struct usb_serial_port *port)
 {
 	struct omninet_data *od;
 
-	od = kmalloc(sizeof(struct omninet_data), GFP_KERNEL);
+	od = kzalloc(sizeof(*od), GFP_KERNEL);
 	if (!od)
 		return -ENOMEM;