Skip to contentSkip to conversation

cbus/cbus.c : kmalloc + memset(0) to kzalloc

PATCH New Komal Shah 1 participant 1 message Mar 16, 2006

lore
Share & tools
lore

Komal Shah

author
#0 lore raw

PATCH 1/6 cbus/cbus.c : kmalloc + memset(0) to kzalloc

Convert kmalloc + memset(0) to kzalloc

---Komal Shah
http://komalshah.blogspot.com/

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

drivers/cbus/cbus.c +1 -3
index eff38be..081c647 100644
@@ -222,12 +222,10 @@ int __init cbus_bus_init(void)
 	struct cbus_host *chost;
 	int ret;
 
-	chost = kmalloc(sizeof (*chost), GFP_KERNEL);
+	chost = kzalloc(sizeof (*chost), GFP_KERNEL);
 	if (chost == NULL)
 		return -ENOMEM;
 
-	memset(chost, 0, sizeof (*chost));
-
 	spin_lock_init(&chost->lock);
 
 	cbus_config = omap_get_config(OMAP_TAG_CBUS, struct omap_cbus_config);