From: Wei Yongjun Date: Fri, 6 Feb 2009 03:08:58 +0000 (+0800) Subject: Staging: usbip: kmem_cache_alloc/memset -> kmem_cache_zalloc X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=e68f2849c14bc64c728b1f35d67887a093c059c6;p=linux-2.6-omap-h63xx.git Staging: usbip: kmem_cache_alloc/memset -> kmem_cache_zalloc Used kmem_cache_zalloc instead of kmem_cache_alloc/memset. Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/usbip/stub_rx.c b/drivers/staging/usbip/stub_rx.c index 2eb61372fe0..1c710628df0 100644 --- a/drivers/staging/usbip/stub_rx.c +++ b/drivers/staging/usbip/stub_rx.c @@ -334,7 +334,7 @@ static struct stub_priv *stub_priv_alloc(struct stub_device *sdev, spin_lock_irqsave(&sdev->priv_lock, flags); - priv = kmem_cache_alloc(stub_priv_cache, GFP_ATOMIC); + priv = kmem_cache_zalloc(stub_priv_cache, GFP_ATOMIC); if (!priv) { dev_err(&sdev->interface->dev, "alloc stub_priv\n"); spin_unlock_irqrestore(&sdev->priv_lock, flags); @@ -342,8 +342,6 @@ static struct stub_priv *stub_priv_alloc(struct stub_device *sdev, return NULL; } - memset(priv, 0, sizeof(struct stub_priv)); - priv->seqnum = pdu->base.seqnum; priv->sdev = sdev;