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: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
7919e91b34
commit
08b4212456
1 changed files with 1 additions and 2 deletions
|
@ -249,10 +249,9 @@ int zpci_fmb_enable_device(struct zpci_dev *zdev)
|
|||
if (zdev->fmb)
|
||||
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)
|
||||
return -ENOMEM;
|
||||
memset(zdev->fmb, 0, sizeof(*zdev->fmb));
|
||||
WARN_ON((u64) zdev->fmb & 0xf);
|
||||
|
||||
args.fmb_addr = virt_to_phys(zdev->fmb);
|
||||
|
|
Loading…
Reference in a new issue