Skip to contentSkip to conversation

kmalloc + memset -> kzalloc conversion

PATCH New Deepak Saxena 1 participant 1 message Oct 1, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kmalloc + memset -> kzalloc conversion

drivers/dio/dio.c +1 -2
@@ -224,11 +224,10 @@ static int __init dio_init(void)
 		set_fs(fs);
 
                 /* Found a board, allocate it an entry in the list */
-		dev = kmalloc(sizeof(struct dio_dev), GFP_KERNEL);
+		dev = kzalloc(sizeof(struct dio_dev), GFP_KERNEL);
 		if (!dev)
 			return 0;
 
-		memset(dev, 0, sizeof(struct dio_dev));
 		dev->bus = &dio_bus;
 		dev->dev.parent = &dio_bus.dev;
 		dev->dev.bus = &dio_bus_type;
Signature · 3 lines
Deepak Saxena - [email protected] - http://www.plexity.net

Even a stopped clock gives the right time twice a day.