Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2da7582f authored by Milton Miller's avatar Milton Miller Committed by Benjamin Herrenschmidt
Browse files

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



Replace kmalloc() + memset()  with kzalloc().

Signed-off-by: default avatarMilton Miller <miltonm@bga.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent da9dc132
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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;