summaryrefslogtreecommitdiffstats
path: root/drivers/staging/usbip
diff options
context:
space:
mode:
authorWei Yongjun <yjwei@cn.fujitsu.com>2009-02-06 11:08:58 +0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-03 14:53:28 -0700
commite68f2849c14bc64c728b1f35d67887a093c059c6 (patch)
tree11f0abdc72b93538de787fec6b59e7ae47e249c6 /drivers/staging/usbip
parentc62d8437aa50cfe996c5a5f8d62387bf9741316f (diff)
downloadlinux-e68f2849c14bc64c728b1f35d67887a093c059c6.tar.gz
linux-e68f2849c14bc64c728b1f35d67887a093c059c6.tar.bz2
linux-e68f2849c14bc64c728b1f35d67887a093c059c6.zip
Staging: usbip: kmem_cache_alloc/memset -> kmem_cache_zalloc
Used kmem_cache_zalloc instead of kmem_cache_alloc/memset. Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/usbip')
-rw-r--r--drivers/staging/usbip/stub_rx.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/usbip/stub_rx.c b/drivers/staging/usbip/stub_rx.c
index 2eb61372fe0a..1c710628df0d 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;