mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
hvc_console: Use kzalloc() instead of kmalloc() + memset()
Replace kmalloc() + memset() with kzalloc(). Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
da9dc13289
commit
2da7582f7c
1 changed files with 1 additions and 3 deletions
|
@ -765,13 +765,11 @@ struct hvc_struct __devinit *hvc_alloc(uint32_t vtermno, int data,
|
||||||
return ERR_PTR(err);
|
return ERR_PTR(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
hp = kmalloc(ALIGN(sizeof(*hp), sizeof(long)) + outbuf_size,
|
hp = kzalloc(ALIGN(sizeof(*hp), sizeof(long)) + outbuf_size,
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!hp)
|
if (!hp)
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
|
|
||||||
memset(hp, 0x00, sizeof(*hp));
|
|
||||||
|
|
||||||
hp->vtermno = vtermno;
|
hp->vtermno = vtermno;
|
||||||
hp->data = data;
|
hp->data = data;
|
||||||
hp->ops = ops;
|
hp->ops = ops;
|
||||||
|
|
Loading…
Add table
Reference in a new issue