Thread (2 messages) 2 messages, 2 authors, 2013-07-26

Re: [PATCH] matroxfb: replace kmalloc and memset with kzalloc.

From: Tomi Valkeinen <hidden>
Date: 2013-07-26 08:36:53
Also in: lkml

On 12/07/13 17:00, Alexandru Juncu wrote:
quoted hunk ↗ jump to hunk
Signed-off-by: Alexandru Juncu <redacted>
---
 drivers/video/matrox/matroxfb_base.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c
index 401a56e..2456529 100644
--- a/drivers/video/matrox/matroxfb_base.c
+++ b/drivers/video/matrox/matroxfb_base.c
@@ -2029,10 +2029,9 @@ static int matroxfb_probe(struct pci_dev* pdev, const struct pci_device_id* dumm
 		return -1;
 	}
 
-	minfo = kmalloc(sizeof(*minfo), GFP_KERNEL);
+	minfo = kzalloc(sizeof(*minfo), GFP_KERNEL);
 	if (!minfo)
 		return -1;
-	memset(minfo, 0, sizeof(*minfo));
 
 	minfo->pcidev = pdev;
 	minfo->dead = 0;
Thanks, I've applied this into my 3.12/fbdev branch.

 Tomi

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help