提交 81f58c67 编写于 作者: J Johan Hovold 提交者: Greg Kroah-Hartman

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: NJohan Hovold <jhovold@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 2bef64b8
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册