Commit 4118fee7 authored by Wei Yongjun's avatar Wei Yongjun Committed by Martin Schwidefsky

s390/pci: use kmem_cache_zalloc instead of kmem_cache_alloc/memset

Using kmem_cache_zalloc() instead of kmem_cache_alloc() and memset().
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 916908df
...@@ -602,10 +602,9 @@ struct zpci_dev *zpci_alloc_device(void) ...@@ -602,10 +602,9 @@ struct zpci_dev *zpci_alloc_device(void)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
/* Alloc aibv & callback space */ /* Alloc aibv & callback space */
zdev->irq_map = kmem_cache_alloc(zdev_irq_cache, GFP_KERNEL); zdev->irq_map = kmem_cache_zalloc(zdev_irq_cache, GFP_KERNEL);
if (!zdev->irq_map) if (!zdev->irq_map)
goto error; goto error;
memset(zdev->irq_map, 0, sizeof(*zdev->irq_map));
WARN_ON((u64) zdev->irq_map & 0xff); WARN_ON((u64) zdev->irq_map & 0xff);
return zdev; return zdev;
......
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