Skip to content

Commit

Permalink
USB: omninet: use kzalloc for private data
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Apr 17, 2013
1 parent 2bef64b commit 81f58c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/serial/omninet.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 81f58c6

Please sign in to comment.