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

Commit 392b7bc1 authored by Mariusz Kozlowski's avatar Mariusz Kozlowski Committed by Linus Torvalds
Browse files

drivers/char/consolemap.c: kmalloc + memset conversion to kzalloc



 drivers/char/consolemap.c | 22678 -> 22650 (-28 bytes)
 drivers/char/consolemap.o | 90113 -> 90029 (-84 bytes)

Signed-off-by: default avatarMariusz Kozlowski <m.kozlowski@tuxland.pl>
Acked-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0b15d04a
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -494,12 +494,11 @@ int con_clear_unimap(struct vc_data *vc, struct unimapinit *ui)
	p = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc;
	p = (struct uni_pagedir *)*vc->vc_uni_pagedir_loc;
	if (p && p->readonly) return -EIO;
	if (p && p->readonly) return -EIO;
	if (!p || --p->refcount) {
	if (!p || --p->refcount) {
		q = kmalloc(sizeof(*p), GFP_KERNEL);
		q = kzalloc(sizeof(*p), GFP_KERNEL);
		if (!q) {
		if (!q) {
			if (p) p->refcount++;
			if (p) p->refcount++;
			return -ENOMEM;
			return -ENOMEM;
		}
		}
		memset(q, 0, sizeof(*q));
		q->refcount=1;
		q->refcount=1;
		*vc->vc_uni_pagedir_loc = (unsigned long)q;
		*vc->vc_uni_pagedir_loc = (unsigned long)q;
	} else {
	} else {