Commit e68f2849 authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman

Staging: usbip: kmem_cache_alloc/memset -> kmem_cache_zalloc

Used kmem_cache_zalloc instead of kmem_cache_alloc/memset.
Signed-off-by: default avatarWei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c62d8437
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment