From 01d3824d513bfad3d56ce238dd1990bee551a6ad Mon Sep 17 00:00:00 2001 From: Levente Kurusa Date: Sun, 18 May 2014 13:13:40 +0200 Subject: [PATCH] qr: qrspec: use kzalloc instead of kmalloc + memset Signed-off-by: Levente Kurusa --- lib/qr/qrspec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/qr/qrspec.c b/lib/qr/qrspec.c index 28d1db0..5a7f366 100644 --- a/lib/qr/qrspec.c +++ b/lib/qr/qrspec.c @@ -434,11 +434,10 @@ static unsigned char *QRspec_createFrame(int version) unsigned int verinfo, v; width = qrspecCapacity[version].width; - frame = kmalloc(width * width, GFP_ATOMIC); + frame = kzalloc(width * width, GFP_ATOMIC); if (frame == NULL) return NULL; - memset(frame, 0, width * width); /* Finder pattern */ putFinderPattern(frame, width, 0, 0); putFinderPattern(frame, width, width - 7, 0); -- 1.8.3.1