提交 2da7582f 编写于 作者: M Milton Miller 提交者: Benjamin Herrenschmidt

hvc_console: Use kzalloc() instead of kmalloc() + memset()

Replace kmalloc() + memset()  with kzalloc().
Signed-off-by: NMilton Miller <miltonm@bga.com>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 da9dc132
......@@ -765,13 +765,11 @@ struct hvc_struct __devinit *hvc_alloc(uint32_t vtermno, int data,
return ERR_PTR(err);
}
hp = kmalloc(ALIGN(sizeof(*hp), sizeof(long)) + outbuf_size,
hp = kzalloc(ALIGN(sizeof(*hp), sizeof(long)) + outbuf_size,
GFP_KERNEL);
if (!hp)
return ERR_PTR(-ENOMEM);
memset(hp, 0x00, sizeof(*hp));
hp->vtermno = vtermno;
hp->data = data;
hp->ops = ops;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册