Commit 08b42124 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 avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 7919e91b
...@@ -249,10 +249,9 @@ int zpci_fmb_enable_device(struct zpci_dev *zdev) ...@@ -249,10 +249,9 @@ int zpci_fmb_enable_device(struct zpci_dev *zdev)
if (zdev->fmb) if (zdev->fmb)
return -EINVAL; return -EINVAL;
zdev->fmb = kmem_cache_alloc(zdev_fmb_cache, GFP_KERNEL); zdev->fmb = kmem_cache_zalloc(zdev_fmb_cache, GFP_KERNEL);
if (!zdev->fmb) if (!zdev->fmb)
return -ENOMEM; return -ENOMEM;
memset(zdev->fmb, 0, sizeof(*zdev->fmb));
WARN_ON((u64) zdev->fmb & 0xf); WARN_ON((u64) zdev->fmb & 0xf);
args.fmb_addr = virt_to_phys(zdev->fmb); args.fmb_addr = virt_to_phys(zdev->fmb);
......
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