public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/usb: Use kzalloc
@ 2011-08-02 16:09 Thomas Meyer
  2011-08-03  9:02 ` Tobias Klauser
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Meyer @ 2011-08-02 16:09 UTC (permalink / raw)
  To: linux-kernel, kernel-janitors

--- a/drivers/net/usb/cdc_ncm.c 2011-07-26 00:46:08.126846923 +0200
+++ b/drivers/net/usb/cdc_ncm.c 2011-08-01 20:20:43.396390040 +0200
@@ -479,12 +479,10 @@ static int cdc_ncm_bind(struct usbnet *d
 	int temp;
 	u8 iface_no;
 
-	ctx = kmalloc(sizeof(*ctx), GFP_KERNEL);
+	ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
 	if (ctx = NULL)
 		return -ENODEV;
 
-	memset(ctx, 0, sizeof(*ctx));
-
 	init_timer(&ctx->tx_timer);
 	spin_lock_init(&ctx->mtx);
 	ctx->netdev = dev->net;



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-04 20:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-02 16:09 [PATCH] net/usb: Use kzalloc Thomas Meyer
2011-08-03  9:02 ` Tobias Klauser
2011-08-04 20:31   ` Julie Sullivan
2011-08-04 20:51     ` Thomas Meyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox