[MPlayer-matrox] r256 - mga_vid/trunk/mga_vid.c

attila subversion at mplayerhq.hu
Wed Jul 18 11:45:40 CEST 2007


Author: attila
Date: Wed Jul 18 11:45:40 2007
New Revision: 256

Log:
use kzalloc instead of kmalloc+memset


Modified:
   mga_vid/trunk/mga_vid.c

Modified: mga_vid/trunk/mga_vid.c
==============================================================================
--- mga_vid/trunk/mga_vid.c	(original)
+++ mga_vid/trunk/mga_vid.c	Wed Jul 18 11:45:40 2007
@@ -838,7 +838,7 @@ static int mga_vid_find_card(void)
 			break;
 		}
 
-		card = kmalloc(sizeof(mga_card_t), GFP_KERNEL);
+		card = kzalloc(sizeof(mga_card_t), GFP_KERNEL);
 		if(!card) 
 		{ 
 			printk(KERN_ERR "mga_vid: memory allocation failed\n");
@@ -1042,8 +1042,6 @@ static void cards_init(mga_card_t * card
 {
 	unsigned int card_option;
 
-	memset(card,0,sizeof(mga_card_t));
-
 	card->pci_dev = dev;
 
 	card->card_type = card_type;



More information about the MPlayer-matrox mailing list